VDB

CVE-2024-41013

CVE-2024-41013 PUBLISHED

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.

PackageEcosystemFixed in
kernel-libbpfAmazon Linux1:6.1.144-170.251.amzn2023
kernel-livepatch-6.1.144-170.251Amazon Linux1:1.0-0.amzn2023
bpftoolAmazon Linux1:6.1.144-170.251.amzn2023
kernel-toolsAmazon Linux1:6.1.144-170.251.amzn2023
kernel-headersAmazon Linux1:6.1.144-170.251.amzn2023
python3-perfAmazon Linux1:6.1.144-170.251.amzn2023
kernel-modules-extra-commonAmazon Linux1:6.1.144-170.251.amzn2023
kernelAmazon Linux1:6.1.144-170.251.amzn2023
linux_kernellinux6.11, 6.6.68, 6.1.142

Affected products

VendorProductVersions
LinuxLinux82025d7f79148fe66a1594a0ebe4ab38152cf9e6, 82025d7f79148fe66a1594a0ebe4ab38152cf9e6, 82025d7f79148fe66a1594a0ebe4ab38152cf9e6
LinuxLinux3.8, 0, 6.1.142
amazon:2023kernel-libbpf0
amazon:2023kernel-livepatch-6.1.144-170.2510
amazon:2023bpftool0
amazon:2023kernel-tools0
amazon:2023kernel-headers0
amazon:2023python3-perf0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel0
linuxlinux_kernel3.8, 3.8, 3.8
amazon:2023perf0
amazon:2023kernel-tools-devel0
amazon:2023kernel-libbpf-devel0
LinuxLinux0, 3.8, 6.11
amazon:2023kernel-devel0
amazon:2023kernel-modules-extra0
amazon:2023kernel-libbpf-static0

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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›