From nobody Sat May 25 01:55:30 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmQ3R01VDz5Lp8Q; Sat, 25 May 2024 01:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmQ3Q6LlYz3x8d; Sat, 25 May 2024 01:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716602130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zB+utW4a+tldrcVCSnmV9wQ4okUcbQVZO3cExffWr7w=; b=Mbd7FxZk1KQ1ged1MArSK+sqkFLWp9jGDpiuZaNQojkVXzhsSKXHa1GZmhKPLpxk5FWNlu 9dnwAX/cTIHsRkElrLFAU9wOOo1xqyxLEHy0cQHPcuWLB/qBAlALEnKSi1+6ViBROl2vqf F46QKsiaQudS2Y5xnlc6PQOr1tdVHMLkjCZVlgFGbH8PQLtAAtP8sHnNhxcHHyAfOv2CU1 5R3jh1+FjPywfQUWOdjJ/t7SHd1CPJ1X8vO8SsjY95v+YRELgGiJ0SjTy/g3N7UvRu77S1 n37lHDNU7ZqHsh/sxzvbIC98vQRGSQZGCY/tj9rlTHlKYy0zbhk+pijcTo0vPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716602130; a=rsa-sha256; cv=none; b=gK6UA/G/eFQzFa2OdgG11hzps8tgqIdY5aUKRJ3zidPtsBgXoTQVRy5GwmEnvdY9LxQtaJ DSrCtmBB9yTZ8EKwboiY23/4tTAT1hDsiPkCi1k4mkQJb9fDMDpZrqPlvFuIPJk7c3WG9H YFffRyL20vsKZ0KGOywEf2XkvW5bdCbRf/t2cni7d67SpyEFC/OgwMwFexK190mxG2lITw khc6R32NvSSe+i+gV/GxvP2PrCl6llGsh0hhc8H6pH45WAp190aMzDjd4TNVIaPbGkan1B gmU1X7rVAedRMFipMsHCmVSvpnV7/8WTzOXCoI9Xmi/XRCdxyoWABtPyvsBlog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716602130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zB+utW4a+tldrcVCSnmV9wQ4okUcbQVZO3cExffWr7w=; b=REAIM8CCozCUHoGlbXXwp0ApSVb/F9aUM0PHWPtqFToZtGDM9wBPusR2DkfqOUQUIiWz65 6ms0atrdtw7nNiloTRrkWWcpMXSjTzYlckcB6kzk/qZk/AkmyFZv+7aqucVsasfgyDsIJH VBJV09in961PvPC9V1WV+LVOKoZXzWsauOj8N4Uep+r8w3B8advEBrIsprfvuBxZZ3aGYE 6PNqGKyFOtnjpE0mo0TsDDoHTVyz6ll4e0qAmKlVBGY0KMdcTiYTVAvm2ol8IpVJDh65OW vMfAjgKf424sc/7i2csg/4CUIPjvos0/4HfnhJCQzCSFJkSOD/Y1a7lazfJ/zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VmQ3Q5xzGzxrw; Sat, 25 May 2024 01:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44P1tUGC053824; Sat, 25 May 2024 01:55:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P1tUxQ053821; Sat, 25 May 2024 01:55:30 GMT (envelope-from git) Date: Sat, 25 May 2024 01:55:30 GMT Message-Id: <202405250155.44P1tUxQ053821@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: 48f4a9b7c9ba - main - net/qt5-networkauth: Address CVE-2024-36048 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48f4a9b7c9ba5e2fb1d48c08c438efa5fe2b5565 Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=48f4a9b7c9ba5e2fb1d48c08c438efa5fe2b5565 commit 48f4a9b7c9ba5e2fb1d48c08c438efa5fe2b5565 Author: Jason E. Hale AuthorDate: 2024-05-25 01:21:10 +0000 Commit: Jason E. Hale CommitDate: 2024-05-25 01:55:21 +0000 net/qt5-networkauth: Address CVE-2024-36048 https://www.qt.io/blog/security-advisory-qstringconverter-0 MFH: 2024Q2 Security: f5fa174d-19de-11ef-83d8-4ccc6adda413 --- net/qt5-networkauth/Makefile | 1 + .../files/patch-src_oauth_qabstractoauth.cpp | 55 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/net/qt5-networkauth/Makefile b/net/qt5-networkauth/Makefile index 2255dfdc9dbf..de0a0948bc2d 100644 --- a/net/qt5-networkauth/Makefile +++ b/net/qt5-networkauth/Makefile @@ -1,5 +1,6 @@ PORTNAME= networkauth PORTVERSION= ${QT5_VERSION}${QT5_KDE_PATCH} +PORTREVISION= 1 CATEGORIES= net PKGNAMEPREFIX= qt5- diff --git a/net/qt5-networkauth/files/patch-src_oauth_qabstractoauth.cpp b/net/qt5-networkauth/files/patch-src_oauth_qabstractoauth.cpp new file mode 100644 index 000000000000..7bcad530ec0f --- /dev/null +++ b/net/qt5-networkauth/files/patch-src_oauth_qabstractoauth.cpp @@ -0,0 +1,55 @@ +Address CVE-2024-36048. + +https://www.qt.io/blog/security-advisory-qstringconverter-0 + +--- src/oauth/qabstractoauth.cpp.orig 2024-01-04 19:21:59 UTC ++++ src/oauth/qabstractoauth.cpp +@@ -37,7 +37,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -46,6 +45,9 @@ + #include + #include + ++#include ++#include ++ + #include + + Q_DECLARE_METATYPE(QAbstractOAuth::Error) +@@ -290,15 +292,19 @@ void QAbstractOAuthPrivate::setStatus(QAbstractOAuth:: + } + } + ++static QBasicMutex prngMutex; ++Q_GLOBAL_STATIC_WITH_ARGS(std::mt19937, prng, (*QRandomGenerator::system())) ++ + QByteArray QAbstractOAuthPrivate::generateRandomString(quint8 length) + { +- const char characters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; +- static std::mt19937 randomEngine(QDateTime::currentDateTime().toMSecsSinceEpoch()); ++ constexpr char characters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + std::uniform_int_distribution distribution(0, sizeof(characters) - 2); + QByteArray data; + data.reserve(length); ++ auto lock = qt_unique_lock(prngMutex); + for (quint8 i = 0; i < length; ++i) +- data.append(characters[distribution(randomEngine)]); ++ data.append(characters[distribution(*prng)]); ++ lock.unlock(); + return data; + } + +@@ -614,6 +620,7 @@ void QAbstractOAuth::resourceOwnerAuthorization(const + } + + /*! ++ \threadsafe + Generates a random string which could be used as state or nonce. + The parameter \a length determines the size of the generated + string.