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 D420B45009 for ; Sat, 4 Oct 2025 07:33:25 +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=1759563206; cv=none; b=XWHr9nuAtQAOCzH5UyUA5CyKKbT0lwHkTMAErDA+9tW4AOWfB7E+8rvgfJSpTmcWc4a6M8PXpcKFJP4PqMIXu9tGenaUIabW2iYw3xvwGESZZGN+kXXF/cAiIUBruSVnoa3udu6jXNAxdPx6G/lGrtC91S49UivX947YyDJJYjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759563206; c=relaxed/simple; bh=E8C/FK3Yjqza0HHaMS3DGKltTYXbqFAzxyYQxGLr7U0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=m/o4UyfnL8vis7mO3gaBkKa/111gaQNxIpMLGownXrMiRDyggnUMqFeMB6y1AgkHRUL+0XjmYMn2v+aF/hqNECAsBUy3SF5rPGQbGjG520EggxJ/mKaZFtvhceVoLx9+f28Zm8RqfKE8M/XAOIntjFwwp72DfE00VU4gfvrl9aM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DJb2WAuy; 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="DJb2WAuy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3CFEC4CEF1; Sat, 4 Oct 2025 07:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759563205; bh=E8C/FK3Yjqza0HHaMS3DGKltTYXbqFAzxyYQxGLr7U0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=DJb2WAuyQlz3hbB0DxLWo+duOO/wR31l6CkaYh6qrh7n84sbdm2QsBlLs3pIV4/w2 sMWwkJW8YSKJj04NCJIocopIkwe4XhPEJas65/cqEeC+Ka6oYO3wXt2tGnfnbe+juC 0u/aHGAZ89zu8SCJJOspwA7Wke8fQFZn/RZ5Re8g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39931: crypto: af_alg - Set merge to zero early in af_alg_sendmsg Date: Sat, 4 Oct 2025 09:33:15 +0200 Message-ID: <2025100416-CVE-2025-39931-8ff7@gregkh> X-Mailer: git-send-email 2.51.0 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=2753; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7Srm7tHwG+208lT5Vu4BlI+L89KlbLJn2tCV+aJMnqQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPzu6ZFXTpSe6h2s5r7Lv+XJzGk8wuF14sVnXq7TJZ6 SXqdqEPO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiYRcYFiz97iwoM23tzrOJ AdNUrlk97ki42cuwYK3SthNbHzDWbKs8Y79tn7P4LkVzAQA= 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 - Set merge to zero early in af_alg_sendmsg If an error causes af_alg_sendmsg to abort, ctx->merge may contain a garbage value from the previous loop. This may then trigger a crash on the next entry into af_alg_sendmsg when it attempts to do a merge that can't be done. Fix this by setting ctx->merge to zero near the start of the loop. The Linux kernel CVE team has assigned CVE-2025-39931 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.38 with commit 8ff590903d5fc7f5a0a988c38267a3d08e6393a2 and fixed in 6.1.154 with commit 6241b9e2809b12da9130894cf5beddf088dc1b8a Issue introduced in 2.6.38 with commit 8ff590903d5fc7f5a0a988c38267a3d08e6393a2 and fixed in 6.6.108 with commit 2374c11189ef704a3e4863646369f1b8e6a27d71 Issue introduced in 2.6.38 with commit 8ff590903d5fc7f5a0a988c38267a3d08e6393a2 and fixed in 6.12.49 with commit 24c1106504c625fabd3b7229611af617b4c27ac7 Issue introduced in 2.6.38 with commit 8ff590903d5fc7f5a0a988c38267a3d08e6393a2 and fixed in 6.16.9 with commit 045ee26aa3920a47ec46d7fcb302420bf01fd753 Issue introduced in 2.6.38 with commit 8ff590903d5fc7f5a0a988c38267a3d08e6393a2 and fixed in 6.17 with commit 9574b2330dbd2b5459b74d3b5e9619d39299fc6f 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-39931 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: crypto/af_alg.c 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/6241b9e2809b12da9130894cf5beddf088dc1b8a https://git.kernel.org/stable/c/2374c11189ef704a3e4863646369f1b8e6a27d71 https://git.kernel.org/stable/c/24c1106504c625fabd3b7229611af617b4c27ac7 https://git.kernel.org/stable/c/045ee26aa3920a47ec46d7fcb302420bf01fd753 https://git.kernel.org/stable/c/9574b2330dbd2b5459b74d3b5e9619d39299fc6f