CVE-2024-40902·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: jfs: xattr: fix buffer overflow for invalid xattr When an xattr size is not what is expected, it is printed out to the kernel log in hex format as a form of debugging. But when that xattr size is bigger than the expected size, printing it out can cause an access off the end of the buffer. Fix this all up by properly restricting the size of the debug hex dump in the kernel log.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.9.6
- Published
- 2024-07-12
Affected versions
From: 6.7
Until: 6.9.6
Fixed in: 6.9.6
How to fix this CVE
Update your Linux kernel to version 6.9.6 or later to address a buffer overflow vulnerability in the JFS extended attribute (xattr) handling code. This vulnerability allows local attackers with low privileges to read or corrupt kernel memory through malformed xattr values. Prioritize this update for systems running kernel versions 6.7 through 6.9.5.
sudo dnf update kernel kernel-headersDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check current kernel version with: uname -r
- Step 2: Verify JFS filesystem usage by running: mount | grep jfs or df -t jfs
- Step 3: Search kernel logs for xattr-related errors: sudo grep -i 'xattr\|jfs' /var/log/kern.log | tail -50
- Step 4: After patching, confirm update with: uname -r (should show 6.9.6 or later) and reboot if necessary
FAQ
What is CVE-2024-40902?
This is a buffer overflow vulnerability in the Linux kernel's JFS filesystem xattr subsystem. When processing unexpectedly large extended attribute values, the kernel's debug logging function can read beyond buffer boundaries, potentially exposing sensitive kernel memory to local attackers.
Is CVE-2024-40902 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, the local privilege requirement and high impact severity warrant timely patching.
What versions of Kernel are affected by CVE-2024-40902?
Linux kernel versions 6.7 through 6.9.5 are vulnerable. Kernel 6.9.6 and later versions contain the fix.
How do I check if my server is vulnerable to CVE-2024-40902?
Run uname -r to display your kernel version. If it shows a version between 6.7 and 6.9.5, you are vulnerable. Additionally, verify JFS usage with: mount | grep jfs — if no JFS filesystems are mounted, the practical risk is reduced but the kernel-level flaw remains.
Does Defensia detect CVE-2024-40902?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2024-40902 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1e84c9b1838152a87cf453270a5fa75c5037e83a
- https://git.kernel.org/stable/c/33aecc5799c93d3ee02f853cb94e201f9731f123
- https://git.kernel.org/stable/c/4598233d9748fe4db4e13b9f473588aa25e87d69
- https://git.kernel.org/stable/c/480e5bc21f2c42d90c2c16045d64d824dcdd5ec7
- https://git.kernel.org/stable/c/7c55b78818cfb732680c4a72ab270cc2d2ee3d0f
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-40902. Free for 1 server.
Get started free