CVE-2024-38599
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-38599 addresses a vulnerability in the Linux kernel's JFFS2 (Journalling Flash File System version 2) filesystem implementation. The vulnerability was discovered by the Linux Verification Center (linuxtesting.org) using the Syzkaller fuzzing tool and was disclosed in June 2024. The issue affects the xattr (extended attributes) handling in JFFS2, where xattr nodes could potentially overflow the eraseblock boundaries (Kernel Git).

Technical details

The vulnerability stems from a lack of size validation in JFFS2's xattr node handling. Unlike regular inode nodes, xattr nodes aren't split across multiple eraseblocks. When an xattr value is too large, it can spill onto the next eraseblock, overwriting existing nodes. This occurs because there was no check to ensure the requested xattr node size was smaller than the eraseblock minus the cleanmarker size. The issue was fixed by adding a size validation check in the dojffs2setxattr function (Kernel Git).

Impact

When exploited, this vulnerability can lead to filesystem corruption and system instability. The overflow can cause various error conditions including CRC failures, node header corruption, and incorrect block placement. In more severe cases, it can trigger KASAN (Kernel Address Sanitizer) crashes due to slab-out-of-bounds memory access (NVD).

Mitigation and workarounds

The vulnerability has been patched in the Linux kernel by adding a size validation check that ensures xattr nodes cannot exceed the eraseblock size minus the cleanmarker size. The fix returns an -ERANGE error when an attempt is made to create an oversized xattr node. Users should update their Linux kernel to a version containing the fix (Kernel Git).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management