CVE-2024-57952

Revert "libfs: fix infinite directory reads for offset dir"

MEDIUM
5.5
CVSS Score
Published: February 12, 2025 at 01:52 PM UTC
Updated: August 5, 2026 at 12:44 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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 <[email protected]> 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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 6.10.76.10.7 ≤ v < 6.116.11 ≤ v < 6.12.126.11 ≤ v < 6.13.16.11 ≤ v < 6.14308b4fc2403b335894592ee9dc212a5e58bb309f6.10.76.136.13 rc16.13 rc26.13 rc36.13 rc46.13 rc56.13 rc66.13 rc764a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a
Vendor states this is fixed in 3f250b82040a72b0059ae00855a74d8570ad2147 (fixed)
Vendor states this is fixed in 9e9e710f68bac49bd9b587823c077d06363440e0 (fixed)
Vendor states this is fixed in b662d858131da9a8a14e68661656989b14dbf113 (fixed)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.12.12 (unaffected)
Vendor states this is fixed in 6.13.1 (unaffected)
Vendor states this is fixed in 6.14 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3f250b82040a72b0059ae00855a74d8570ad2147
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9e9e710f68bac49bd9b587823c077d06363440e0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b662d858131da9a8a14e68661656989b14dbf113

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.5MEDIUMCISA-ADP
Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card