{"id":"CVE-2024-35846","published":"2024-05-17T14:47:25Z","modified":"2026-05-11T20:12:16Z","title":"mm: zswap: fix shrinker NULL crash with cgroup_disable=memory","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: zswap: fix shrinker NULL crash with cgroup_disable=memory\n\nChristian reports a NULL deref in zswap that he bisected down to the zswap\nshrinker.  The issue also cropped up in the bug trackers of libguestfs [1]\nand the Red Hat bugzilla [2].\n\nThe problem is that when memcg is disabled with the boot time flag, the\nzswap shrinker might get called with sc->memcg == NULL.  This is okay in\nmany places, like the lruvec operations.  But it crashes in\nmemcg_page_state() - which is only used due to the non-node accounting of\ncgroup's the zswap memory to begin with.\n\nNhat spotted that the memcg can be NULL in the memcg-disabled case, and I\nwas then able to reproduce the crash locally as well.\n\n[1] https://github.com/libguestfs/libguestfs/issues/139\n[2] https://bugzilla.redhat.com/show_bug.cgi?id=2275252","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0019,"percentile":0.08814,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/b0fdabc908a7f81d12382c87ca9e46a9c2e14042","tags":[]},{"url":"https://git.kernel.org/stable/c/682886ec69d22363819a83ddddd5d66cb5c791e1","tags":[]}],"priority":{"score":1.8,"factors":[{"name":"EPSS percentile","points":1.76}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= b5ba474f3f518701249598b35c581b92a3c95b48, < b0fdabc908a7f81d12382c87ca9e46a9c2e14042",">= b5ba474f3f518701249598b35c581b92a3c95b48, < 682886ec69d22363819a83ddddd5d66cb5c791e1"]},{"vendor":"Linux","product":"Linux","versions":["6.8"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-17T17:15:58.051096Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-35554","exploited":false,"provenance":"source"}}