CVE-2024-41013
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-41013 affects the Linux kernel's XFS filesystem implementation. The vulnerability was discovered and disclosed on July 29, 2024, and involves a potential out-of-bounds read vulnerability in the directory data block handling code. The issue affects Linux kernel systems that use the XFS filesystem (NVD).

Technical details

The vulnerability exists in the XFS filesystem code where the directory data block traversal logic lacks proper bounds checking. Before the patch, the code only verified that the start offset of directory entries was within range. In a crafted filesystem image, if the last entry is xfsdir2data_unused, an attacker could modify dup->length to dup->length-1, leaving 1 byte of space that could be incorrectly interpreted as a new entry in subsequent traversals, potentially leading to an out-of-bounds read when accessing fixed members (Kernel Git).

Impact

The vulnerability could allow an attacker with the ability to create or modify XFS filesystem images to cause an out-of-bounds read in the kernel, potentially leading to information disclosure or system crashes. This affects systems where untrusted users can mount or interact with XFS filesystems (NVD).

Mitigation and workarounds

The vulnerability has been patched by adding proper sanity checks for xfsdir2dataunused and xfsdir2dataentry to ensure they don't access memory beyond valid regions. The fix ensures that remaining bytes are large enough to hold an unused entry before accessing xfsdir2dataunused and validates that xfsdir2dataunused is XFSDIR2DATAALIGN byte aligned. It also verifies that remaining bytes are sufficient to hold a directory entry with a single-byte name before accessing xfsdir2dataentry (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