CVE-2024-35846

Severity CVSS v4.0:
Pending analysis
Type:
CWE-476 NULL Pointer Dereference
Publication date:
17/05/2024
Last modified:
30/12/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> mm: zswap: fix shrinker NULL crash with cgroup_disable=memory<br /> <br /> Christian reports a NULL deref in zswap that he bisected down to the zswap<br /> shrinker. The issue also cropped up in the bug trackers of libguestfs [1]<br /> and the Red Hat bugzilla [2].<br /> <br /> The problem is that when memcg is disabled with the boot time flag, the<br /> zswap shrinker might get called with sc-&gt;memcg == NULL. This is okay in<br /> many places, like the lruvec operations. But it crashes in<br /> memcg_page_state() - which is only used due to the non-node accounting of<br /> cgroup&amp;#39;s the zswap memory to begin with.<br /> <br /> Nhat spotted that the memcg can be NULL in the memcg-disabled case, and I<br /> was then able to reproduce the crash locally as well.<br /> <br /> [1] https://github.com/libguestfs/libguestfs/issues/139<br /> [2] https://bugzilla.redhat.com/show_bug.cgi?id=2275252

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.8 (including) 6.8.9 (excluding)
cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.9:rc5:*:*:*:*:*:*