CVE-2024-41013
xfs: don't walk off the end of a directory data block
Description
In the Linux kernel, the following vulnerability has been resolved: xfs: don't walk off the end of a directory data block This adds sanity checks for xfs_dir2_data_unused and xfs_dir2_data_entry to make sure don't stray beyond valid memory region. Before patching, the loop simply checks that the start offset of the dup and dep is within the range. So in a crafted image, if last entry is xfs_dir2_data_unused, we can change dup->length to dup->length-1 and leave 1 byte of space. In the next traversal, this space will be considered as dup or dep. We may encounter an out of bound read when accessing the fixed members. In the patch, we make sure that the remaining bytes large enough to hold an unused entry before accessing xfs_dir2_data_unused and xfs_dir2_data_unused is XFS_DIR2_DATA_ALIGN byte aligned. We also make sure that the remaining bytes large enough to hold a dirent with a single-byte name before accessing xfs_dir2_data_entry.
INFO
Published Date :
July 29, 2024, 7:15 a.m.
Last Modified :
Nov. 3, 2025, 6:15 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | [email protected] |
Solution
- Update the affected kernel packages.
- Update the kernel and/or kernel-headers packages.
- Reboot the system if required.
Public PoC/Exploit Available at Github
CVE-2024-41013 has a 4 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-41013.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-41013 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-41013
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Java Shell
None
None
C Shell Makefile
None
HTML C# CSS JavaScript Dockerfile
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-41013 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-41013 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 03, 2025
Action Type Old Value New Value Added Reference https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html -
Initial Analysis by [email protected]
Sep. 25, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H Added CWE CWE-125 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.68 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.11 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions up to (excluding) 6.1.142 Added Reference Type CVE: https://git.kernel.org/stable/c/0c7fcdb6d06cdf8b19b57c17605215b06afa864a Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/0c7fcdb6d06cdf8b19b57c17605215b06afa864a Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/b0932e4f9da85349d1c8f2a77d2a7a7163b8511d Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/ca96d83c93071f95cf962ce92406621a472df31b Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 27, 2025
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/b0932e4f9da85349d1c8f2a77d2a7a7163b8511d -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Dec. 27, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/ca96d83c93071f95cf962ce92406621a472df31b -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/0c7fcdb6d06cdf8b19b57c17605215b06afa864a -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jul. 29, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: xfs: don't walk off the end of a directory data block This adds sanity checks for xfs_dir2_data_unused and xfs_dir2_data_entry to make sure don't stray beyond valid memory region. Before patching, the loop simply checks that the start offset of the dup and dep is within the range. So in a crafted image, if last entry is xfs_dir2_data_unused, we can change dup->length to dup->length-1 and leave 1 byte of space. In the next traversal, this space will be considered as dup or dep. We may encounter an out of bound read when accessing the fixed members. In the patch, we make sure that the remaining bytes large enough to hold an unused entry before accessing xfs_dir2_data_unused and xfs_dir2_data_unused is XFS_DIR2_DATA_ALIGN byte aligned. We also make sure that the remaining bytes large enough to hold a dirent with a single-byte name before accessing xfs_dir2_data_entry. Added Reference kernel.org https://git.kernel.org/stable/c/0c7fcdb6d06cdf8b19b57c17605215b06afa864a [No types assigned]