CVE-2024-35846

mm: zswap: fix shrinker NULL crash with cgroup_disable=memory

MEDIUM
5.5
CVSS Score
Published: May 17, 2024 at 02:47 PM UTC
Updated: June 17, 2026 at 07:35 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.8 ≤ v < 6.8.96.8 ≤ v < 6.96.9 rc16.9 rc26.9 rc36.9 rc46.9 rc5b5ba474f3f518701249598b35c581b92a3c95b48
Vendor states this is fixed in 682886ec69d22363819a83ddddd5d66cb5c791e1 (fixed)
Vendor states this is fixed in b0fdabc908a7f81d12382c87ca9e46a9c2e14042 (fixed)
Vendor states this is fixed in 6.8 (unaffected)
Vendor states this is fixed in 6.8.9 (unaffected)
Vendor states this is fixed in 6.9 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/682886ec69d22363819a83ddddd5d66cb5c791e1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b0fdabc908a7f81d12382c87ca9e46a9c2e14042

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card