cve.bz

CVE-2024-35797 linux linux kernel: Out-of-bounds Write

5.5 mediumEPSS 0.7%Fix available

Medium (5.5) in linux linux kernel. EPSS 0.7% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: mm: cachestat: fix two shmem bugs When cachestat on shmem races with swapping and invalidation, there are two possible bugs: 1) A swapin error can have resulted in a poisoned swap entry in the shmem inode's xarray. Calling get_shadow_from_swap_cache() on it will result in an out-of-bounds access to swapper_spaces[]. Validate the entry with non_swap_entry() before going further. 2) When we find a valid swap entry in the shmem's inode, the shadow entry in the swapcache might not exist yet: swap IO is still in progress and we're before __remove_mapping; swapin, invalidation, or swapoff have removed the shadow from swapcache after we saw the shmem swap entry. This will send a NULL to workingset_test_recent(). The latter purely operates on pointer bits, so it won't crash - node 0, memcg ID 0, eviction timestamp 0, etc. are all valid inputs - but it's a bogus test. In theory that could result in a false "recently evicted" count. Such a false positive wouldn't be the end of the world. But for code clarity and (future) robustness, be explicit about this case. Bail on get_shadow_from_swap_cache() returning NULL.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 53rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-05-17. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-35797 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-35797?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-35797?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-35797 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux6.5 and later

Fixed in

ProductRelease lineFixed in
Linux6.66.6.24
Linux6.76.7.12
Linux6.86.8.3
Linuxlater releases6.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13, 14linux6.7.12-1DEBIAN-CVE-2024-35797
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2024-35797
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 11 moreno fix listedUBUNTU-CVE-2024-35797
Ubuntu20.04:LTSlinux-gke, linux-riscv, linux-raspi2 and 24 moreno fix listedUBUNTU-CVE-2024-35797
Ubuntu22.04:LTSlinux-riscv, linux-aws-6.2, linux-aws-6.5 and 30 moreno fix listedUBUNTU-CVE-2024-35797
Ubuntu24.04:LTSlinux6.8.0-35.35UBUNTU-CVE-2024-35797 USN-6816-1
Ubuntu24.04:LTSlinux-aws6.8.0-1009.9UBUNTU-CVE-2024-35797 USN-6817-1
Ubuntu24.04:LTSlinux-azure6.8.0-1008.8UBUNTU-CVE-2024-35797 USN-6817-3
Ubuntu24.04:LTSlinux-gcp6.8.0-1008.9UBUNTU-CVE-2024-35797 USN-6817-1
Ubuntu24.04:LTSlinux-gke6.8.0-1004.7UBUNTU-CVE-2024-35797 USN-6817-3
Ubuntu24.04:LTSlinux-ibm, linux-oracle, linux-oem-6.86.8.0-1006.6UBUNTU-CVE-2024-35797 USN-6816-1 USN-6817-2 USN-6878-1
Ubuntu24.04:LTSlinux-raspi6.8.0-1005.5UBUNTU-CVE-2024-35797 USN-6816-1
Ubuntu24.04:LTSlinux-riscv, linux-lowlatency6.8.0-35.35.1UBUNTU-CVE-2024-35797 USN-6816-1
2 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:9::appstreamrv, perf, rtla and 26 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::appstream, enterprise_linux:9::crb, enterprise_linux:9::nfv and 1 morebpftool-debuginfo0:7.3.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::baseosbpftool, bpftool-debuginfo0:7.3.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 43 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 14 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-core, perf-debuginfo and 18 more0:5.14.0-427.35.1.el9_4RHSA-2024:6567
AlmaLinux9bpftool7.3.0-427.35.1.el9_4ALSA-2024:6567
AlmaLinux9rv, perf, rtla and 58 more5.14.0-427.35.1.el9_4ALSA-2024:6567
Rocky Linux9kernel0:5.14.0-427.35.1.el9_4RLSA-2024:6567
Rocky Linux9kernel0:5.14.0-427.35.1.el9_4.cloud.1.0RXSA-2024:6567
Alpaquita25, streamlinux-lts6.12.41-r0BELL-CVE-2024-35797

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is rated as having a Moderate impact because it requires local access to trigger concurrent shared memory swapping and cachestat operations, which can lead to a system crash. The issue is confined to local users with access to the system call interface and cannot be exploited across the network. Successful triggering causes kernel instability or a denial of service rather than code execution or privilege escalation.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9kernel-0:5.14.0-427.35.1.el9_4Fixed 2024-09-11RHSA-2024:6567
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-35797.

References

Check your stackJSON