Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 32A5F580389 for ; Fri, 11 Sep 2026 20:06:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789157170; cv=none; b=MtyHRjit71B2MvoOTFLuNX/1PcHKCDdMiHSFQ2wdUKRtN7BMMUFmXUlgDiyk+iylQzPcXM1z3Jp+GfqyS+oOgrc4oud/srbBsELgvKwdEqxrCdbdmChiFQdA/lvfQuIezD696z4cOKhUHRt8FvPSxssF5jHCRr8TT9F2yGS8bjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789157170; c=relaxed/simple; bh=N1gv049f4ifrSXusfbBsPg65fOPAuj+hfuR8Xcpnito=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PF2GoeziqpoXRNqNUGkiTH1DhkGUgS1gJMSQXSbYtAqXKQ9MA+/l+hn/dSwqCTgLukVQgiZdg9NSczyR68vPPU7HZ70C27mSgLuIFDas7PD/m4WlzEpcuPXf4AiOjy9IYCfDNgJn6r5re6KsViHdhebvOK2/N19AHmvVwIO8fEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=asyXGWKs; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="asyXGWKs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 698DA1F00898; Fri, 11 Sep 2026 20:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789157164; bh=urB8ov04maF4TVPd3whOw7kTvjy2LLzz7vnmwuZwR3Y=; h=From:To:Cc:Subject:Date:Reply-To; b=asyXGWKs9wobQk9hZ2mVG4dnwoqkhQpWrVun+7Oz/p5ZQn82/pL3Jmz1zH7d4eOVA Px9hKdrgniDVGKFEqJyEn4BhfTz2oeCow3+znEao5fMVxhywU60W1U1bJ4MmAAQjh4 i8smemb8C7iky+x5OJarxz8lu3mVk+OCh3vqjFe8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89757: mm/mglru: fix and remove redundant unevictable folio handling Date: Fri, 11 Sep 2026 21:47:26 +0200 Message-ID: <2026091108-CVE-2026-89757-c308@gregkh> X-Mailer: git-send-email 2.55.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=3776; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Rz/lQtORn3lI+DJXgNw+59vJGsmjcWnXtBKDuAYhJCQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIifk3eJoud73ZcHSF3u4Plw/pLVhF7OG1fvJj/rz9 qgs9+hd3BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATKWhjWHBZ1eiyzJGmDN7o fWYJ5/3iXcIqvRkW7G5uDpdc+//6Ju6a3sVGeZ7dSuf6AQ== 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/mglru: fix and remove redundant unevictable folio handling sort_folio() has a shortcut for moving folios that are no longer evictable but are still sitting on a generation list. However, this shortcut is buggy. It does not follow the PG_lru usage convention, and it has a more serious issue. Unevictable folios are not threaded on lists[LRU_UNEVICTABLE], so that folio->lru can be reused to hold folio->mlock_count (see the comment in lruvec_init()). Hence lruvec_add_folio() skips the list_add() for them, and every other place that turns a folio unevictable initialises mlock_count explicitly: lru_add() sets it to 0, __mlock_folio() and __mlock_new_folio() set it to !!folio_test_mlocked(folio). sort_folio() sets nothing, and the lru_gen_del_folio() right above it may have already poisoned folio->lru via list_del(), so mlock_count ends up aliasing LIST_POISON2, which reads as 0x122, i.e. 290. The result is user visible. On munlock, __munlock_folio() decrements that bogus count, finds it still non-zero and bails out before clearing PG_mlocked, so the folio remains unevictable and the Mlocked accounting stays inflated until the folio is freed. The shortcut also touches the LRU flags in the wrong order. It calls lru_gen_del_folio() while PG_lru is still set, so a concurrent folio_test_clear_lru() (e.g. compaction, folio_isolate_lru()) can succeed on a folio that has already been taken off the generation list, which may lead to unexpected behavior. So fix it by isolating them as common folios and letting the generic shrink path cull them. This matches the classical LRU behavior, and there should be no visible effect on the generic eviction or isolation behavior. There is no performance concern either, such a folio goes through this once, and then it is off the generation lists for good. The Linux kernel CVE team has assigned CVE-2026-89757 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1 with commit ac35a490237446b71e3b4b782b1596967edd0aa8 and fixed in 6.18.51 with commit 54a58d6656dd403b686b247f0bad8507cbfb45df Issue introduced in 6.1 with commit ac35a490237446b71e3b4b782b1596967edd0aa8 and fixed in 7.2.4 with commit 15d3a2a71c8bf7333d019d249ee33669e69e4275 Issue introduced in 6.1 with commit ac35a490237446b71e3b4b782b1596967edd0aa8 and fixed in 7.3-rc1 with commit f7e698e326b239a91ea15844817551921209e826 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-89757 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/vmscan.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/54a58d6656dd403b686b247f0bad8507cbfb45df https://git.kernel.org/stable/c/15d3a2a71c8bf7333d019d249ee33669e69e4275 https://git.kernel.org/stable/c/f7e698e326b239a91ea15844817551921209e826