From mboxrd@z Thu Jan 1 00:00:00 1970 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 AD9B052F28C for ; Thu, 17 Sep 2026 16:42:18 +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=1789663339; cv=none; b=VgsxbJV9IW4fUPvz5+2GLjZ+7X0DRtQQO8MFeJ/ToP74QbzrqkXaTiJE19LoMGHd8j7RqopGKzo5zpuAuRYGxCsDjZ2vW/StFBSFDN/gb2eTGBGI9gInnXXgfZYNxGwtMHqiEASR0lLBKIs3cdtQXbQoyREUCdNBgx76cqDwT/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789663339; c=relaxed/simple; bh=u+x4p+aDm7a4fqQcDgCvlhPDPRMJMYczC+jbpfUVcNA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JfLB8ZB2Sp5C8n9oz766e9E32rKYy04p0IdrpKV2gMa3YGIN+AD9QqKBqaaWEOaiPGDbxrSZiQf8+YYmV2Nh1Qih4SxqyJRQbG62/a1b4sqTUnO4UrSnxGDz2pCnweb8Ca0EUHSHWt8L8AXgN9vlCzD2bV/nS7YF6wVaOISGHW4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ONK2Ypi0; 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="ONK2Ypi0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FFD11F000FF; Thu, 17 Sep 2026 16:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789663338; bh=nEgmQgElS4FJJlMKfp0IxjywO7hmkyPCEFcozGzehDw=; h=From:To:Cc:Subject:Date:Reply-To; b=ONK2Ypi0uxI4jQdKGdiBZMBytVASeIYVKxuc56oV0kmbJ6uCk6azuvkl/GFgcGyUF h53SPMjW0/+CQ0JnT+LbD1hX4grVXuJxq/zLsF01gGY2idQs/EZ4Xzfq84SgF2nR20 SOZLTmQ5YwdM4QvYKF6WCKdGswqo+mI04Q6zbPTI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-93197: memcg: move LRU size accounting on reparenting instead of copying it Date: Thu, 17 Sep 2026 17:17:54 +0100 Message-ID: <2026091705-CVE-2026-93197-6630@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=4025; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5teyKjexCM12LXIrovVhGqCj9+mnrDPPbuJISeKxcyA=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlrBO7eO3/Ud9miJVmn13rPE0iaGsH4ZzKH1bK/MS7R6 3f0fAqx6IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJnF3DsGCqKEu+d7OXVNzP Taq5y15fYOrav4lhrux7rmMqV+fOOJKo2/9EQ3VNdqBYBAA= 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: memcg: move LRU size accounting on reparenting instead of copying it When a memory cgroup is offlined its LRU folios are reparented to the parent. lruvec_reparent_lru() splices the child's lists into the parent's and credits the parent with the child's per-zone lru_zone_size[], but never clears the child's copy, so the size is copied rather than moved. lru_gen_reparent_memcg() does the same for MGLRU. The parent is left correct, credited with exactly the folios it took over. The stale value sits on the child and nothing will correct it: folio->memcg_data now resolves to the parent, so every later update_lru_size() for those folios goes there. Dying cgroups are not freed immediately and mem_cgroup_iter() still walks them, so shrink_lruvec() keeps being called on them. get_scan_count() reads the phantom counter through lruvec_lru_size() and the scan loop then grinds through nr[] in SWAP_CLUSTER_MAX steps against an empty list, for as long as the dead cgroup lives. Under MGLRU the MGLRU scanner runs instead, but count_shadow_nodes() sums all of NR_LRU_LISTS through lruvec_lru_size() and over-budgets the shadow node limit just the same. On one 251 GiB host a sweep of every mz->lru_zone_size[] found 380 counters describing folios on no list at all: 124777314 pages, 476 GiB, 1.89x the machine's RAM, across 57 cgroups. All were on memcgs with CSS_DYING set and CSS_ONLINE clear, and parent/child pairs reported byte-identical sizes. LRU_UNEVICTABLE needs its size moved too. Its list is deliberately not spliced because lruvec_init() poisons the head - the unevictable LRU is imaginary and folios are never threaded on it - but the size is kept by lruvec_add_folio()/lruvec_del_folio() and those folios account to the parent from here on. This depends on commit bf4ade7dbd76 ("memcg: keep folio's objcg same as its node") and must not be backported ahead of it. Without that invariant a folio's objcg can belong to another node, so a folio already spliced onto the parent's list can still resolve to the child's lruvec until the objcg's node is reparented in a later iteration of memcg_reparent_objcgs(); clearing the child's counter early then lets lruvec_del_folio() underflow it and trip the WARN_ONCE()/VM_BUG_ON() in mem_cgroup_update_lru_size(). The Linux kernel CVE team has assigned CVE-2026-93197 to this issue. Affected and fixed versions =========================== Issue introduced in 7.1 with commit 07a6e9a2c199fed361f528781284d56771d0016f and fixed in 7.2.6 with commit 007bc1842317bb99f5f6205afede940f951674c2 Issue introduced in 7.1 with commit 07a6e9a2c199fed361f528781284d56771d0016f and fixed in 7.3-rc1 with commit 0e0ac326c511d514817cc7b6d7741afd59098ce2 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-93197 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/folio.c 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/007bc1842317bb99f5f6205afede940f951674c2 https://git.kernel.org/stable/c/0e0ac326c511d514817cc7b6d7741afd59098ce2