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=1796046263; b=lJBWbZL3nSYzkV0GflAPxVwMbId2mqA1oklpNvcNaBLA9NmutSwD0etsSDgcsanKLSNP vWY4uv6pm6WDX8U4ApI3rW39cbmhWkAdbKVhzalgQcAZKKbNFjzN/D+di29mSlcyWnCc0 DqhH5Vkkiq5Y1W4zpsos72zcxahedzd74Zdq5Apx27o1h0GFys2j0uFJhXZ/ijyKqAkSp ta6jYfr452+1OXAuiAEKlL77fvHa4CT9/5dOo0UF/i6M5Re/j8e3VNQPksrPSBE7SN9qn TgHMcb0KczUmd5O+Rs1AB13pwUD1QTIzHim4tSTzHdBUf3Ds5vw5ZrAG9jj2TwhOIFA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796046263; 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=IQzp0g5bmraC9diunAYo9Ds8tf4mLK33WOG3alHTTtY=; b=g86Ej590dQLJcr7doNx5fprdau9ngBBwimTrRd6iQy9mDvXh+I8wm2CpMmvd4s3kpEcF 3/M7S188vZnZpgMs+KP3VQsp1c+Cw18PvKFrAsZkAJK+jh4UIBDTuoduOaGviTNp62RmI LAsaJIc7yMHFE6KXroUj8SXFfJrNZtef6+37usQW/BJt3kFx9Y5OQWzYS23FKcc+LqdSl xDuwIBNc8RNHygoToX3RQlEyQJqy1/Yy4gdR8GTxDWvNIJArnZnJC8mXcK5/PMcNQ5O5N +8wVQSshGP+2eaYEW4pIxz/3HqjdqSh1joWP2xtRPXw8t76/vWxdMORAVOoAUW6Zb9g== 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=UV4LNESt; 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 447F7606A320 for ; Mon, 30 Nov 2026 13:44: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=UV4LNESt Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9306F1F00896; Mon, 30 Nov 2026 13:44:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796046263; bh=IQzp0g5bmraC9diunAYo9Ds8tf4mLK33WOG3alHTTtY=; h=From:To:Cc:Subject:Date:Reply-To; b=UV4LNEStTxjE5esP7ALLonK+R1zSozq9sJ4/a3fOP/jg01k8GdD0/NXJMh5no0MpR U9ussc5sfPd1/dMhvWhtfahZaWjpE5MzVX+ARjYSyO4HUFeJFPbPwEI/odmncwvm7a AwypqZubG9+KUUPZ3bKCaT/PSoJPNWh08uE3Pi9M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-138895: mm: hugetlb: drop refcount before freeing on memcg charge failure Date: Mon, 30 Nov 2026 14:26:40 +0100 Message-ID: <2026113033-CVE-2026-138895-e253@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=2517; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=FGKUhXl/KttcJLrTNwD3FCdHy3VFE8zXMZIcORYkacs=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm8lX5zmOQ5XGc9yD7FJfXXfM6H8kuzrFQrFLjUGHtf6 t5tU4nviGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIk4GjHM4XD9fdp08/7XKbM2 z1E8fCP3/8UzSxnmx30XmvurXaSHc1GgyN2qDb4R+17OAwA= 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: hugetlb: drop refcount before freeing on memcg charge failure When mem_cgroup_charge_hugetlb(folio, gfp) returns -ENOMEM, the folio has its refcount set to 1 via folio_ref_unfreeze(folio, 1). The error path calls free_huge_folio(folio) directly, which expects a refcount of 0. Hence, VM_BUG_ON_FOLIO(folio_ref_count(folio), folio) is triggered. Even with CONFIG_DEBUG_VM disabled, returning a folio with refcount 1 to the freelist can corrupt allocator state later. Use folio_put(folio) instead of free_huge_folio(folio) to properly drop the reference before freeing it. The Linux kernel CVE team has assigned CVE-2026-138895 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit 991135774c0e05a4734e6d32aa03b00355e4cac9 and fixed in 6.18.64 with commit eeb9425606f386f726b47ee323687ee02c7b34f8 Issue introduced in 6.14 with commit 991135774c0e05a4734e6d32aa03b00355e4cac9 and fixed in 7.3.4 with commit 3f87063217efc3b0198e49ec1a9b262ff81ac406 Issue introduced in 6.14 with commit 991135774c0e05a4734e6d32aa03b00355e4cac9 and fixed in 7.4-rc1 with commit e95d29c5df84f19881cd30b491fc81aa98f44b45 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-138895 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/hugetlb.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/eeb9425606f386f726b47ee323687ee02c7b34f8 https://git.kernel.org/stable/c/3f87063217efc3b0198e49ec1a9b262ff81ac406 https://git.kernel.org/stable/c/e95d29c5df84f19881cd30b491fc81aa98f44b45