In the Linux kernel, the following vulnerability has been resolved:
mm: swap_cgroup: fix NULL deref in lookup_swap_cgroup_id on swapless host
lookup_swap_cgroup_id() passes swap_cgroup_ctrl[type].map to __swap_cgroup_id_lookup() without checking that the type was ever registered via swap_cgroup_swapon(). On a swapless host every ctrl->map is NULL, so __swap_cgroup_id_lookup() dereferences NULL + a scaled swp_offset().
Since commit bea67dcc5eea ("mm: attempt to batch free swap entries for zap_pte_range()"), zap_pte_range() -> swap_pte_batch() calls lookup_swap_cgroup_id() on any non-present, non-none PTE that decodes as a real swap entry, without first validating it against swap_info[]. A single PTE corrupted into a type-0 swap entry takes the host down at process exit.
We hit this in production on a swapless 6.12.58 host: ~1s of "get_swap_device: Bad swap file entry 3f800204222bb" (do_swap_page() being correctly defensive about the same entry) followed by
BUG: unable to handle page fault for address: 000003f800204220 RIP: 0010:lookup_swap_cgroup_id+0x2b/0x60 Call Trace: swap_pte_batch+0xbf/0x230 zap_pte_range+0x4c8/0x780 unmap_page_range+0x190/0x3e0 exit_mmap+0xd9/0x3c0 do_exit+0x20c/0x4b0
syzbot has reported the identical stack.
The source of the PTE corruption is a separate bug; this change makes the teardown path as robust as the fault path already is. Every other caller of lookup_swap_cgroup_id() is downstream of a get_swap_device() that has already validated the entry, so the new branch is cold.
CVSS Details
- CVSS 3.1 Base Score: 5.5
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade kernel6.12Upgrade kernel6.18-develUpgrade kernel6.18-tools-debuginfoUpgrade perf6.12Upgrade bpftool6.18-debuginfoUpgrade kernel-livepatch-6.12.100-125.179Upgrade python3-perf6.18Upgrade kernel6.12-headersUpgrade kernel6.18-debuginfo-common-x86_64Upgrade bpftool6.12Upgrade kernel6.18-modules-extra-commonUpgrade perf6.18Upgrade perf6.18-debuginfoUpgrade bpftool6.18Upgrade python3-perf6.18-debuginfoUpgrade kernel6.18-debuginfo-common-aarch64Upgrade kernel-livepatch-6.18.39-79.141Upgrade kernel6.18-toolsUpgrade kernel6.12-tools-debuginfoUpgrade kernel6.12-debuginfoUpgrade microvm-kernel6.18Upgrade kernel6.18-tools-develUpgrade python3-perf6.12-debuginfoUpgrade kernel6.18-headersUpgrade kernel6.12-develUpgrade perf6.12-debuginfoUpgrade kernel6.18-debuginfoUpgrade python3-perf6.12Upgrade bpftool6.12-debuginfoUpgrade kernel6.12-modules-extra-commonUpgrade kernel6.12-debuginfo-common-x86_64Upgrade kernel6.12-debuginfo-common-aarch64Upgrade kernel6.12-toolsUpgrade kernel6.12-tools-develUpgrade kernel6.18-modules-extraUpgrade kernel6.18Upgrade kernel6.12-modules-extra | Aug 18, 2026 | Jul 25, 2026 |
| Debian | — | Upgrade linux-6.12Upgrade linux | Aug 2, 2026 | Aug 2, 2026 |
| Ubuntu | — | Upgrade linux-image-ibmUpgrade linux-image-7.0.0-1006-gkeUpgrade linux-image-nvidia-7.0Upgrade linux-image-7.0.0-1013-ibmUpgrade linux-image-7.0.0-1019-raspi-realtimeUpgrade linux-image-aws-64k-7.0Upgrade linux-image-virtualUpgrade linux-image-7.0.0-1011-gcp-64kUpgrade linux-image-7.0.0-1013-oemUpgrade linux-image-nvidia-64k-7.0Upgrade linux-image-7.0.0-1011-gcpUpgrade linux-image-virtual-hwe-24.04Upgrade linux-image-virtual-hwe-26.04Upgrade linux-image-raspi-realtimeUpgrade linux-image-7.0.0-1019-raspiUpgrade linux-image-7.0.0-1018-nvidiaUpgrade linux-image-genericUpgrade linux-image-ibm-7.0Upgrade linux-image-realtime-7.0Upgrade linux-image-nvidiaUpgrade linux-image-generic-64k-hwe-26.04Upgrade linux-image-virtual-7.0Upgrade linux-image-nvidia-bos-64k-7.0Upgrade linux-image-gcp-7.0Upgrade linux-image-generic-64kUpgrade linux-image-7.0.0-2018-nvidia-bos-64kUpgrade linux-image-nvidia-bos-7.0Upgrade linux-image-nvidia-hwe-26.04Upgrade linux-image-oem-26.04Upgrade linux-image-oem-26.04bUpgrade linux-image-7.0.0-31-realtimeUpgrade linux-image-7.0.0-31-realtime-64kUpgrade linux-image-7.0.0-31-generic-64kUpgrade linux-image-oem-26.04aUpgrade linux-image-awsUpgrade linux-image-raspiUpgrade linux-image-gke-64kUpgrade linux-image-aws-7.0Upgrade linux-image-gke-7.0Upgrade linux-image-realtime-64k-7.0Upgrade linux-image-nvidia-bosUpgrade linux-image-nvidia-64kUpgrade linux-image-raspi-7.0Upgrade linux-image-realtime-64kUpgrade linux-image-gke-64k-hwe-26.04Upgrade linux-image-7.0.0-1012-awsUpgrade linux-image-7.0.0-2018-nvidia-bosUpgrade linux-image-nvidia-64k-hwe-26.04Upgrade linux-image-realtime-64k-hwe-26.04Upgrade linux-image-oem-7.0Upgrade linux-image-7.0.0-1018-nvidia-64kUpgrade linux-image-gkeUpgrade linux-image-realtime-hwe-26.04Upgrade linux-image-generic-hwe-24.04Upgrade linux-image-7.0.0-31-genericUpgrade linux-image-nvidia-bos-64kUpgrade linux-image-generic-hwe-26.04Upgrade linux-image-gcp-64k-7.0Upgrade linux-image-realtimeUpgrade linux-image-generic-7.0Upgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-aws-64kUpgrade linux-image-7.0.0-1012-aws-64kUpgrade linux-image-gke-hwe-26.04Upgrade linux-image-gke-64k-7.0Upgrade linux-image-generic-64k-7.0Upgrade linux-image-gcp-64kUpgrade linux-image-7.0.0-1006-gke-64kUpgrade linux-image-raspi-realtime-7.0Upgrade linux-image-gcp | Sep 14, 2026 | Sep 7, 2026 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Aug 14, 2026 | Jul 25, 2026 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub