From nobody Sat May 25 02:01:20 2024 X-Original-To: dev-commits-ports-all@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 4VmQB91bPTz5LpyB; Sat, 25 May 2024 02:01:21 +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 4VmQB90zw4z3xvp; Sat, 25 May 2024 02:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716602481; 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=xSIOV1tDCJiwpVte0LQSmCKp8svjdsW0NSMQ6kx6cRI=; b=pYe+rKvTzeyDuqIThVMQA2K1CfXZSl6AFkJ+6adFQzPQ4r+H0dGMzdZvK4m/lWKvG7ti9x kL+JWlSUAY24JupyD+0OZZUauCC6145aU42rHJNzQMS+0B+gmsjB9MatC70s5P8d5y0GqW g/HIrShgbv14ttuEuer887T1uoyVuHTlF/KReSPZR7oi9RG7RmnunuFdEwY20cZNXljnAH 94RLSG/FZWPKmOQre2r1xc9vuiLWVt48P3pJZcW/ueHniaDOKw2XEqfgF79WY0xdsCTP3f knjrAVCcjXJDZrB4TA9bvOl+U86XtDj+vGglm/02bWYxc0LARxP4jAiYvbjrow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716602481; a=rsa-sha256; cv=none; b=CT+q5iOxwpWJRmIfBwxNtHraP35XTfpHauBId5nuSJbufmfpy+jUb2hKXY5qro392P725j NIVR2j49ghpQC14y09vq3mikh8mU2hcOObAwM7amajzefA56oSx7MYkm+Lvw72MBcriuEl 6cB1n/SQffmY0DufuzrqBx+B6Zuf1DyYafSmKZSkD0ztcqEokApKPpYjJMY8cssy6tQ5BU RKRcIZNNWwuvnF79MXbKTaTEhkC0BppOvS/Yt/+SeNMztcXYHPoMYQ8DK9QV4as5GcQlOJ JVHYG21Wv+JovvvjvWM3tmuaLIWcfmQSuuPsU6mRh3AX8QzLmVp1ccUfwfJI7w== 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=1716602481; 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=xSIOV1tDCJiwpVte0LQSmCKp8svjdsW0NSMQ6kx6cRI=; b=YBmt9ROskIjvnLUTkDa+x1zHYsaqi1xAICb8DFPTCIV6vYQUsml3nM2ISfiM3mqNcht+fi E5HizsJEQ76oGMCKj00hAES3fZl0vjJgmHQNb7bW42OBG5eQa/kdYHUliUPJ/hCl79D85T fV2YBlAUmrjs5Xd9MiBEblz0v4nDDiF0PmX0tFWVlyUhxd8+d0w/sCoS7ErVSNVCpenzL5 3hF0REyXZhTJ7FcQ6O5OGbNOUECebkDVhG3Uoy87wF/L+L/denrWExUDzIQDqVNTlcjcXR viKgQb1/OhCfZ3CDYS56FrmlzcYian7ZJSzxiNMzlvJAYUO/3OjsLkmPumYd8g== 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 4VmQB90bFmzy1x; Sat, 25 May 2024 02:01:21 +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 44P21KSY070037; Sat, 25 May 2024 02:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P21K2k070034; Sat, 25 May 2024 02:01:20 GMT (envelope-from git) Date: Sat, 25 May 2024 02:01:20 GMT Message-Id: <202405250201.44P21K2k070034@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: "Jason E. Hale" Subject: git: df8e14bffee9 - 2024Q2 - net/qt5-networkauth: Address CVE-2024-36048 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@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/2024Q2 X-Git-Reftype: branch X-Git-Commit: df8e14bffee9062eb6ad3200c17c8580fdbbd071 Auto-Submitted: auto-generated The branch 2024Q2 has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=df8e14bffee9062eb6ad3200c17c8580fdbbd071 commit df8e14bffee9062eb6ad3200c17c8580fdbbd071 Author: Jason E. Hale AuthorDate: 2024-05-25 01:21:10 +0000 Commit: Jason E. Hale CommitDate: 2024-05-25 01:58:30 +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 (cherry picked from commit 48f4a9b7c9ba5e2fb1d48c08c438efa5fe2b5565) --- 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.