CVE-2024-41013
xfs: don't walk off the end of a directory data block
Reported by linux · Published July 29, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-libbpf | Amazon Linux | 1:6.1.144-170.251.amzn2023 |
| kernel-livepatch-6.1.144-170.251 | Amazon Linux | 1:1.0-0.amzn2023 |
| bpftool | Amazon Linux | 1:6.1.144-170.251.amzn2023 |
| kernel-tools | Amazon Linux | 1:6.1.144-170.251.amzn2023 |
| kernel-headers | Amazon Linux | 1:6.1.144-170.251.amzn2023 |
| python3-perf | Amazon Linux | 1:6.1.144-170.251.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 1:6.1.144-170.251.amzn2023 |
| kernel | Amazon Linux | 1:6.1.144-170.251.amzn2023 |
| linux_kernel | linux | 6.11, 6.6.68, 6.1.142 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 82025d7f79148fe66a1594a0ebe4ab38152cf9e6, 82025d7f79148fe66a1594a0ebe4ab38152cf9e6, 82025d7f79148fe66a1594a0ebe4ab38152cf9e6 |
| Linux | Linux | 3.8, 0, 6.1.142 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-livepatch-6.1.144-170.251 | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel | 0 |
| linux | linux_kernel | 3.8, 3.8, 3.8 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| Linux | Linux | 0, 3.8, 6.11 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
Timeline
- Jul 28, 2024 CVE Published
- Jul 29, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (10 in total, the first dated here)
- Jan 7, 2026 Security Advisory (98 in total, the first dated here)
- Apr 2, 2026 Distribution Patch (91 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-41013
vulnetix vdb fixes CVE-2024-41013
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-41013/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart