From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154423; b=Oh3Zv4CfrHAYQgkMoAkud6lcSZ3ROS4+r+VF8htfOJycZjOdyHWgED66sRjBVyhfnesa MLi3F+bYxFVPuBHSGChvBo94srWw2WUqObHlx1IeA5Law+S1uEdOPK7q9E1hMrMbyz5vB 8I8nbEKjdLW1qd+i1ziwLLQBuWT7bsLPEpACcoW1UfdCO5/yx1sYfX6pitL4ups2O9kQO I/Xx2p1hs1iFRy355G4qoJWjSK7iyIX5N2ZDCHv5qorD2F9mx4JRvXuyT4uXF0DJ/rnJX FXKnq3yiMP2W/xD4cpWgSJZd06ul2vEe9DMO6CC9RsA2oKrEtnO0UB6H91nhup8STXg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154423; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=zUNBlwZZ9Y/X98CNPAdXDPsbPm0hbTjhLkBIk5gofus=; b=c4iOH3n/NY4P9Z4hIbfZDw/VYIQslzrXjbv/wYiU2qFImtmQCLuXAIx7LL2/+s8k98Gj Pc5laBfFWuKBojjBPlCLGSa3CHKEHU8oLwilpghsjS8gQiO/vhej20WbeRi1SSUubDJOr RTD+a+/40M1hynt4Hn5utyL50VJtKHn1mjKa/bkjyQX5nN2yIOmr3EodSYzF0KaIf7ppP 9KCP0sedvq4F6QibvLInv3W1lRPuMo7YSUxXuOCL69rWlvWAqfQOMBJSma2DjJ2rsA5B5 QSgmlCpU5gDrCEsEPiQTAPnVygWpEMxhLB+ntTQYPsBq4dx5NuD5jCMA2AqAIYADj4g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Mr1dyKXG; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C183606A50E for ; Fri, 20 Nov 2026 06:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Mr1dyKXG Received: by smtp.kernel.org (Postfix) with ESMTPSA id 786951F000C6; Fri, 20 Nov 2026 06:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154423; bh=zUNBlwZZ9Y/X98CNPAdXDPsbPm0hbTjhLkBIk5gofus=; h=From:To:Cc:Subject:Date:Reply-To; b=Mr1dyKXGa9/oUdJqct1HvaHcaSAvf18AIEDxIHKDdQ0IeIf32yBKcHHSitJfruxgh /qsWudBMJukKbY1YxGNadotFsRTzEUfJfPQu60RtX3JnsgQS4btVcLZDXvTu0J9S/1 bsmt3ztXJnAyd3tOi71U5EfeqamAR7vuqEOswBWw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99738: mm/shmem: preserve allocation errors when swapping in large entries Date: Fri, 20 Nov 2026 06:52:04 +0100 Message-ID: <2026112016-CVE-2026-99738-b2d4@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2482; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=KJ2m5KCr3nLvBl/ue6mjj4eqiLDAlUIm19CVBeZDyCQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/78/gvHD2ysyYCZM+Kd/13Dx3VXKI7W/WH9d/qjIWh iouCfl6oiOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmIveLYcGuD5b7nC7PWHHp n1tt0f3fHIWOZ28xLJj8Nqbz2qJvv51D5615MjVgydL8dl4A 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: mm/shmem: preserve allocation errors when swapping in large entries shmem_swapin_folio() adjusts swap to the requested slot within a large swap entry before allocating a folio. If allocation or charging fails, the error path compares this adjusted value with the original entry still stored in the XArray in shmem_confirm_swap(). Unless the index is at the start of the entry, this turns -ENOMEM into -EEXIST even though nothing changed. The caller retries -EEXIST, so persistent allocation failures can leave the task spinning instead of returning the error. Restore swap to index_entry on allocation failure so the existing error path checks the original entry. This preserves the allocation error if the entry is unchanged and still retries if it changed concurrently. The Linux kernel CVE team has assigned CVE-2026-99738 to this issue. Affected and fixed versions =========================== Issue introduced in 6.17 with commit 91ab656ece137c368a3189dfd42f8c9203a6285c and fixed in 7.3.5 with commit 680afc486db200e7b08307cb28be4f90766afcff Issue introduced in 6.17 with commit 91ab656ece137c368a3189dfd42f8c9203a6285c and fixed in 7.4-rc2 with commit f4ce23b1feef16d435aa1188b6c2a637a5373ed5 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-99738 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: mm/shmem.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/680afc486db200e7b08307cb28be4f90766afcff https://git.kernel.org/stable/c/f4ce23b1feef16d435aa1188b6c2a637a5373ed5