Vulnerability · Published Feb 12, 2025 · Assigned by Linux
CVE-2024-57952Revert "libfs: fix infinite directory reads for offset dir"
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: Revert "libfs: fix infinite directory reads for offset dir" The current directory offset allocator (based on mtree_alloc_cyclic) stores the next offset value to return in octx->next_offset. This mechanism typically returns values that increase monotonically over time. Eventually, though, the newly allocated offset value wraps back to a low number (say, 2) which is smaller than other already- allocated offset values. Yu Kuai <yukuai3@huawei.com> reports that, after commit 64a7ce76fb90 ("libfs: fix infinite directory reads for offset dir"), if a directory's offset allocator wraps, existing entries are no longer visible via readdir/getdents because offset_readdir() stops listing entries once an entry's offset is larger than octx->next_offset. These entries vanish persistently -- they can be looked up, but will never again appear in readdir(3) output. The reason for this is that the commit treats directory offsets as monotonically increasing integer values rather than opaque cookies, and introduces this comparison: if (dentry2offset(dentry) >= last_index) { On 64-bit platforms, the directory offset value upper bound is 2^63 - 1. Directory offsets will monotonically increase for millions of years without wrapping. On 32-bit platforms, however, LONG_MAX is 2^31 - 1. The allocator can wrap after only a few weeks (at worst). Revert commit 64a7ce76fb90 ("libfs: fix infinite directory reads for offset dir") to prepare for a fix that can work properly on 32-bit systems and might apply to recent LTS kernels where shmem employs the simple_offset mechanism.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | linux | 6.12.12-1 | DEBIAN-CVE-2024-57952 |
| Debian:14 | linux | 6.12.12-1 | DEBIAN-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux | 6.8.0-62.65 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-62.65 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1030.32 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1030.32 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1030.32~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1030.32~22.04.1 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1030.35 | USN-7596-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1030.35 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1013.13~24.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1013.13~24.04.1 | USN-7448-1 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1030.35~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1030.35~22.04.1 | USN-7596-1 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1018.19 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1018.19 | USN-7596-2 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1031.33 | USN-7595-5 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1031.33 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1013.13~24.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1031.33~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1031.33~22.04.1 | USN-7595-5 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1026.30 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1026.30 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1013.15 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1013.15 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-24.24~24.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-24.24~24.04.1 | USN-7445-1 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-64.67~22.04.1 | USN-7653-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1027.27 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1027.27 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1027.27~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-62.65.1 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-62.65.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1012.13~24.04.1 | USN-7445-1 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1012.13~24.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-62.65.1~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-62.65.1~22.04.1 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1029.32 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1029.32 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1029.32~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1029.32~22.04.1 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1029.32.1 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1029.32.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1020.20 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1020.20 | USN-7445-1 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1029.29 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1029.29 | USN-7595-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1027.28 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1027.28 | USN-7595-4 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1027.28~22.04.1 | USN-7595-4 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1027.28~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1029.33 | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1029.33 | USN-7595-4 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-62.65~22.04.1 | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-57952 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-57952 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a – before 9e9e710f68bac49bd9b587823c077d06363440e064a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a – before 3f250b82040a72b0059ae00855a74d8570ad214764a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a – before b662d858131da9a8a14e68661656989b14dbf113308b4fc2403b335894592ee9dc212a5e58bb309f6.10.7 – before 6.11 |
| Linux | Linux | 6.11 |