CVE-2024-40902
📋 TL;DR
This CVE describes a buffer overflow vulnerability in the Linux kernel's JFS filesystem when handling invalid extended attributes (xattrs). An attacker could potentially exploit this to cause a kernel panic (denial of service) or possibly execute arbitrary code with kernel privileges. This affects Linux systems using the JFS filesystem.
💻 Affected Systems
- Linux kernel with JFS filesystem support
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Kernel memory corruption leading to arbitrary code execution with kernel privileges, potentially resulting in full system compromise.
Likely Case
Kernel panic causing system crash and denial of service, requiring physical or remote console access to reboot.
If Mitigated
Minor system instability or logged warnings if exploit attempts are blocked by security controls.
🎯 Exploit Status
Requires local access to create/modify xattrs on JFS filesystem. Exploit would need to bypass kernel protections like KASLR and SMAP/SMEP.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel with commits 1e84c9b1838152a87cf453270a5fa75c5037e83a or later
Vendor Advisory: https://git.kernel.org/stable/c/1e84c9b1838152a87cf453270a5fa75c5037e83a
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable JFS filesystem
linuxRemove JFS kernel module to prevent use of vulnerable code path
rmmod jfs
echo 'blacklist jfs' >> /etc/modprobe.d/blacklist.conf
Mount JFS partitions as noexec
linuxPrevent execution of potentially malicious code from JFS filesystem
mount -o remount,noexec /path/to/jfs/mountpoint
🧯 If You Can't Patch
- Restrict local user access to systems with JFS filesystems
- Implement strict access controls on JFS mount points and monitor for unusual xattr activity
🔍 How to Verify
Check if Vulnerable:
Check if JFS module is loaded: lsmod | grep jfs. Check kernel version against distribution security advisories.
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commits or is newer than vulnerable versions. Check /proc/version or uname -r.
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages
- JFS error messages in dmesg or /var/log/kern.log
- Unexpected xattr operations on JFS filesystems
Network Indicators:
- None - local vulnerability only
SIEM Query:
source="kernel" AND ("panic" OR "JFS" AND "xattr" AND "overflow")
🔗 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
- https://git.kernel.org/stable/c/b537cb2f4c4a1357479716a9c339c0bda03d873f
- https://git.kernel.org/stable/c/f0dedb5c511ed82cbaff4997a8decf2351ba549f
- https://git.kernel.org/stable/c/fc745f6e83cb650f9a5f2c864158e3a5ea76dad0
- 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
- https://git.kernel.org/stable/c/b537cb2f4c4a1357479716a9c339c0bda03d873f
- https://git.kernel.org/stable/c/f0dedb5c511ed82cbaff4997a8decf2351ba549f
- https://git.kernel.org/stable/c/fc745f6e83cb650f9a5f2c864158e3a5ea76dad0
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html