Vulnerability · Published Jul 29, 2024 · Assigned by Linux
CVE-2024-41013xfs: don't walk off the end of a directory data block
High 7.1
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | bpftool | 7.3.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-debug | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-debug-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-debug-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-debug-devel-matched | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-debug-modules | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-debug-modules-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-debug-modules-extra | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-devel-matched | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-modules | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-modules-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-64k-modules-extra | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-abi-stablelists | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-cross-headers | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug-devel-matched | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug-modules | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug-modules-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug-modules-extra | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-debug-uki-virt | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-devel-matched | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-doc | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-headers | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-modules | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-modules-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-modules-extra | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-debug | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-debug-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-debug-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-debug-modules | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-debug-modules-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-debug-modules-extra | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-modules | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-modules-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-rt-modules-extra | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-tools | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-tools-libs | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-tools-libs-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-uki-virt | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-zfcpdump | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-zfcpdump-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-zfcpdump-devel | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-zfcpdump-devel-matched | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-zfcpdump-modules | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-zfcpdump-modules-core | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | kernel-zfcpdump-modules-extra | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | libperf | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | perf | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | python3-perf | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | rtla | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| AlmaLinux:9 | rv | 5.14.0-427.42.1.el9_4 | ALSA-2024:8617 |
| Debian:12 | linux | 6.1.147-1 | DEBIAN-CVE-2024-41013 |
| Debian:12 | linux | 6.1.147-1 | DSA-5973-1 |
| Debian:13 | linux | 6.11.2-1 | DEBIAN-CVE-2024-41013 |
| Debian:14 | linux | 6.11.2-1 | DEBIAN-CVE-2024-41013 |
| Rocky Linux:9 | kernel | 0:5.14.0-427.42.1.el9_4 | RLSA-2024:8617 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux | 6.8.0-60.63 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux | 6.8.0-60.63 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1029.31 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1029.31 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1029.31~22.04.1 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1029.31~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1029.34 | USN-7513-3 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1029.34 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1029.34~22.04.1 | USN-7513-3 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1029.34~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1016.17 | USN-7522-1 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1016.17 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1030.32 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1030.32 | USN-7515-2 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1030.32~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1030.32~22.04.1 | USN-7515-2 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1025.29 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1025.29 | USN-7515-1 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1012.14 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1012.14 | USN-7515-2 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-60.63~22.04.1 | USN-7513-4 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-60.63~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1026.26 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1026.26 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1026.26~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-60.63.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-60.63.1 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-60.63.1~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-60.63.1~22.04.1 | USN-7513-1 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1028.31 | USN-7514-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1028.31 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1028.31~22.04.1 | USN-7514-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1028.31~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1028.31.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1028.31.1 | USN-7514-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1028.28 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1028.28 | USN-7513-3 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1026.27 | USN-7513-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1026.27 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1026.27~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1026.27~22.04.1 | USN-7513-5 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | USN-7524-1 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-60.63.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-62.65~22.04.1 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-41013 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-41013 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2024-41013 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 82025d7f79148fe66a1594a0ebe4ab38152cf9e6 – before b0932e4f9da85349d1c8f2a77d2a7a7163b8511d82025d7f79148fe66a1594a0ebe4ab38152cf9e6 – before ca96d83c93071f95cf962ce92406621a472df31b82025d7f79148fe66a1594a0ebe4ab38152cf9e6 – before 0c7fcdb6d06cdf8b19b57c17605215b06afa864a |
| Linux | Linux | 3.8 |