Skip to contentSkip to conversation

CVE-2023-52939: mm: memcg: fix NULL pointer in mem_cgroup_track_foreign_dirty_slowpath()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 27, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

mm: memcg: fix NULL pointer in mem_cgroup_track_foreign_dirty_slowpath()

As commit 18365225f044 ("hwpoison, memcg: forcibly uncharge LRU pages"), hwpoison will forcibly uncharg a LRU hwpoisoned page, the folio_memcg could be NULl, then, mem_cgroup_track_foreign_dirty_slowpath() could occurs a NULL pointer dereference, let's do not record the foreign writebacks for folio memcg is null in mem_cgroup_track_foreign_dirty() to fix it.

The Linux kernel CVE team has assigned CVE-2023-52939 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.4 with commit 97b27821b4854ca744946dae32a3f2fd55bcd5bc and fixed in 6.1.11 with commit b79ba5953f6fdc5559389ad415620bffc24f024b
	Issue introduced in 5.4 with commit 97b27821b4854ca744946dae32a3f2fd55bcd5bc and fixed in 6.2 with commit ac86f547ca1002aec2ef66b9e64d03f45bbbfbb9

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-2023-52939

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:
include/linux/memcontrol.h

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/b79ba5953f6fdc5559389ad415620bffc24f024b
	https://git.kernel.org/stable/c/ac86f547ca1002aec2ef66b9e64d03f45bbbfbb9