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 192CB364055 for ; Sat, 25 Apr 2026 08:47:39 +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=1777106860; cv=none; b=V1yHyI3fGz6C9mVsi7oiQ9AVQylORABzgB5Nt0El3e1U1/3DMwy+4rRW+nK7eDpQsJl1zlnS6e2wQqOkl4cuJ7cwxWB0BmHLkBrI2t5uujwAsvp40NznLdjDxT0g3eixwlnfNyuaJH8K9hwLRNc6JGA9Ar4LdKoyloN3e7VNJrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777106860; c=relaxed/simple; bh=lUlZ/mwuGg3VMmhUXHjzXAtx5UbVOWW76k7dT8EoXBY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dNo1qMU2IpFEXlUQKK1Ou/FZ/wy8m7FsDU0kjg6HYn6k7WTT7IthKpgmPLIWBlLUHoJepM8In/yFwHZ9sJ9HbdVgjeYJR6QXTr7lk8fLZF3tj+9qSh93PmVDObs7yWLb3odsBiQ5TQi6FnVLFfW83ltObKwCZL20Oc42UrYtxAk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XLuPKGY2; 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="XLuPKGY2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2680CC2BCB0; Sat, 25 Apr 2026 08:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777106859; bh=lUlZ/mwuGg3VMmhUXHjzXAtx5UbVOWW76k7dT8EoXBY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=XLuPKGY2+0ujEb8NasbdlKmcONIPPfk0HUGead+jnSzUdN7apMt0W93Tw9yjp1Pya 6U2EdLJU1pEFmyTyXiVz7Zxv6xwjhCuqsndmJjwPPOA1TaMb8T4+PjNwsqIPypUzhp qsoomDO3PCtRDNKcSlilZUpgXP90e517rUejaV3Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31677: crypto: af_alg - limit RX SG extraction by receive buffer budget Date: Sat, 25 Apr 2026 10:46:44 +0200 Message-ID: <2026042544-CVE-2026-31677-1a29@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2803; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/D6SrEZiprVYAvX+RebngefmpUR/5EXPGRGKU6qZXxg=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlv6kuOVX371fNXcEPlRcnwqL6z0iEW7EpynPMmySjYx GXYvivoiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInE9zDMd05btuLNtLLrJ/LW W1bvL3i5pmvPY4YF249Y7d63SkzxdlbQl8U7Lu9yWp6xBgA= 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 - limit RX SG extraction by receive buffer budget Make af_alg_get_rsgl() limit each RX scatterlist extraction to the remaining receive buffer budget. af_alg_get_rsgl() currently uses af_alg_readable() only as a gate before extracting data into the RX scatterlist. Limit each extraction to the remaining af_alg_rcvbuf(sk) budget so that receive-side accounting matches the amount of data attached to the request. If skcipher cannot obtain enough RX space for at least one chunk while more data remains to be processed, reject the recvmsg call instead of rounding the request length down to zero. The Linux kernel CVE team has assigned CVE-2026-31677 to this issue. Affected and fixed versions =========================== Issue introduced in 4.14 with commit e870456d8e7c8d57c059ea479b5aadbb55ff4c3a and fixed in 6.12.83 with commit 9bf3e6ccfdcfe56ae3190d1ae987dacf1cfef4f9 Issue introduced in 4.14 with commit e870456d8e7c8d57c059ea479b5aadbb55ff4c3a and fixed in 6.18.24 with commit 07c6f6ffe29009426f0bd4d3cfbb6308b8ea8453 Issue introduced in 4.14 with commit e870456d8e7c8d57c059ea479b5aadbb55ff4c3a and fixed in 6.19.14 with commit 4a264b2614c73c96666e196bbabe0cead52bdba7 Issue introduced in 4.14 with commit e870456d8e7c8d57c059ea479b5aadbb55ff4c3a and fixed in 7.0 with commit 8eceab19eba9dcbfd2a0daec72e1bf48aa100170 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-2026-31677 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 crypto/algif_skcipher.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/9bf3e6ccfdcfe56ae3190d1ae987dacf1cfef4f9 https://git.kernel.org/stable/c/07c6f6ffe29009426f0bd4d3cfbb6308b8ea8453 https://git.kernel.org/stable/c/4a264b2614c73c96666e196bbabe0cead52bdba7 https://git.kernel.org/stable/c/8eceab19eba9dcbfd2a0daec72e1bf48aa100170