Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 777B51DA60F for ; Fri, 24 Oct 2025 12:25:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761308717; cv=none; b=Q2XI5JVwhCaBRgTO8LEZTB/Pgj2pdw/zZFfgaDrufWpyBFc9KolfeT5lP59xvVsLps1gwVv/4Nz9IcGA6jrNDzOOUzPA+bSSoaMvCo3R0dcKSwM1x/MxFFbSRdxc2Ob8pDCTUkKfqWaunMsG8BQK3DsMc6L8eRssTbXuIxCutAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761308717; c=relaxed/simple; bh=C66uq+fhEkM8mEJXOebnjGvWtgM/ymk4Jz/fhq/2ILg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CXv5NRmnN8TyLWnxJH3Qnk6c/qtcyW+goz/3X3usE2P+Fbg1bEEMQkuepszOIlcDcq0QRYdlyfl8XrLkUL5AwxspshVopNT/wnoik5/Zbk/+B1Ytgxepb+7jkVNiRtaXUcJlNHCsciL/jVQIkV647qu+xl0ZE9CLM6F+A24ljPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mssviGgB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mssviGgB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58B6AC4CEF5; Fri, 24 Oct 2025 12:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761308716; bh=C66uq+fhEkM8mEJXOebnjGvWtgM/ymk4Jz/fhq/2ILg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mssviGgBb4vu4HWoUmxZz/cuipdptY07EjpdV+/MkNpbX+w2dNmIK/bAQGKEChKbS hsRimRGOYQfJa3C9l5RTDH7zDpTg7R7We2AX/yE/COhm5xIWqf+HjhFtfeYGtkhWKP wEzIYgcCtaMKwX2td5RIClUVv9iICM6CgIFfmAyI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40022: crypto: af_alg - Fix incorrect boolean values in af_alg_ctx Date: Fri, 24 Oct 2025 14:25:05 +0200 Message-ID: <2025102404-CVE-2025-40022-cf34@gregkh> X-Mailer: git-send-email 2.51.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3020; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=xyxPjR1jFq6nzIxks4aCfyzr12sx9ywLzCgUv64YSV0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBm/CxQ8b3U7dyySnGJ7+kratJLD0SJTzeIS1kkofTAzF Y3cJ8fTEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABM5c5xhvn+ise6Egy2q72Jf tNypdQpm7HrcyDC/fuv9/M//N9jOniC56Gdv/DOdFrYoAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: crypto: af_alg - Fix incorrect boolean values in af_alg_ctx Commit 1b34cbbf4f01 ("crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg") changed some fields from bool to 1-bit bitfields of type u32. However, some assignments to these fields, specifically 'more' and 'merge', assign values greater than 1. These relied on C's implicit conversion to bool, such that zero becomes false and nonzero becomes true. With a 1-bit bitfields of type u32 instead, mod 2 of the value is taken instead, resulting in 0 being assigned in some cases when 1 was intended. Fix this by restoring the bool type. The Linux kernel CVE team has assigned CVE-2025-40022 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.154 with commit 1f323a48e9b5ebfe6dc7d130fdf5c3c0e92a07c8 and fixed in 6.1.155 with commit 54506c6335690f4ef1b9f154e34f5a604c72c1ed Issue introduced in 6.6.108 with commit 7c4491b5644e3a3708f3dbd7591be0a570135b84 and fixed in 6.6.109 with commit 8703940bd30b5ad94408d28d7192db2491cd3592 Issue introduced in 6.12.49 with commit 9aee87da5572b3a14075f501752e209801160d3d and fixed in 6.12.50 with commit 316b090c2fee964c307a634fecc7df269664b158 Issue introduced in 6.16.9 with commit 45bcf60fe49b37daab1acee57b27211ad1574042 and fixed in 6.16.10 with commit fbe96bd25423e61273d8831e995260b429d850b6 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-40022 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: include/crypto/if_alg.h Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/3a21698ace915a445bce2d0dcfc84b6d2199baf7 https://git.kernel.org/stable/c/d382d6daf0184490f366562469a5673f65ee2662 https://git.kernel.org/stable/c/54506c6335690f4ef1b9f154e34f5a604c72c1ed https://git.kernel.org/stable/c/8703940bd30b5ad94408d28d7192db2491cd3592 https://git.kernel.org/stable/c/316b090c2fee964c307a634fecc7df269664b158 https://git.kernel.org/stable/c/fbe96bd25423e61273d8831e995260b429d850b6 https://git.kernel.org/stable/c/d0ca0df179c4b21e2a6c4a4fb637aa8fa14575cb