{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2024-57952",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-01-19T11:50:08.381Z",
        "datePublished": "2025-02-12T13:52:45.229Z",
        "dateUpdated": "2026-08-05T11:47:03.053Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:47:03.053Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"libfs: fix infinite directory reads for offset dir\"\n\nThe current directory offset allocator (based on mtree_alloc_cyclic)\nstores the next offset value to return in octx->next_offset. This\nmechanism typically returns values that increase monotonically over\ntime. Eventually, though, the newly allocated offset value wraps\nback to a low number (say, 2) which is smaller than other already-\nallocated offset values.\n\nYu Kuai <yukuai3@huawei.com> reports that, after commit 64a7ce76fb90\n(\"libfs: fix infinite directory reads for offset dir\"), if a\ndirectory's offset allocator wraps, existing entries are no longer\nvisible via readdir/getdents because offset_readdir() stops listing\nentries once an entry's offset is larger than octx->next_offset.\nThese entries vanish persistently -- they can be looked up, but will\nnever again appear in readdir(3) output.\n\nThe reason for this is that the commit treats directory offsets as\nmonotonically increasing integer values rather than opaque cookies,\nand introduces this comparison:\n\n\tif (dentry2offset(dentry) >= last_index) {\n\nOn 64-bit platforms, the directory offset value upper bound is\n2^63 - 1. Directory offsets will monotonically increase for millions\nof years without wrapping.\n\nOn 32-bit platforms, however, LONG_MAX is 2^31 - 1. The allocator\ncan wrap after only a few weeks (at worst).\n\nRevert commit 64a7ce76fb90 (\"libfs: fix infinite directory reads for\noffset dir\") to prepare for a fix that can work properly on 32-bit\nsystems and might apply to recent LTS kernels where shmem employs\nthe simple_offset mechanism."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
                        "baseScore": 7.1,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The offset allocator is driven and the corrupted listing observed entirely through ordinary local filesystem syscalls (creat/rename/unlink and getdents64) on a mounted tmpfs. No network protocol handler is involved.\nAC:L - Exhausting the 2^31 offset space on a 32-bit kernel is a fully deterministic attacker-driven loop with no race window, no memory-layout dependency, and no unknown state — it succeeds every time, and the same condition even arises spontaneously in normal operation within weeks.\nPR:L - Only an unprivileged local account is needed; /tmp and /dev/shm are world-writable tmpfs by default, and the offset context is per-directory and shared, so ordinary create/unlink rights suffice to exhaust it for every user of that directory.\nUI:N - The attacker triggers the wrap entirely with their own syscalls; victims are affected simply by listing the directory afterwards, requiring no action on their part.\nS:U - The defect and its consequences are confined to the kernel's tmpfs/libfs layer within the same security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:N - The flaw causes entries to be omitted from directory listings rather than exposed; no kernel memory, pointer, or otherwise inaccessible data is disclosed to the attacker.\nI:H - An unprivileged attacker causes the kernel to return systematically falsified directory contents for a shared tmpfs directory, permanently hiding an unbounded set of other users' entries so that backup, archival, cleanup, and audit tooling silently operate on and destroy an incorrect view of the data.\nA:H - Directory enumeration of the affected tmpfs directory is completely and persistently broken for all hidden entries across every process on the system, rendering those files unreachable to any enumeration-based consumer until unmount or reboot."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/libfs.c"
                    ],
                    "versions": [
                        {
                            "version": "64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a",
                            "lessThan": "9e9e710f68bac49bd9b587823c077d06363440e0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a",
                            "lessThan": "3f250b82040a72b0059ae00855a74d8570ad2147",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a",
                            "lessThan": "b662d858131da9a8a14e68661656989b14dbf113",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "308b4fc2403b335894592ee9dc212a5e58bb309f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6.10.7",
                            "lessThan": "6.11",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/libfs.c"
                    ],
                    "versions": [
                        {
                            "version": "6.11",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.11",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.12",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.1",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11",
                                    "versionEndExcluding": "6.12.12"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11",
                                    "versionEndExcluding": "6.13.1"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11",
                                    "versionEndExcluding": "6.14"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.10.7"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/9e9e710f68bac49bd9b587823c077d06363440e0"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3f250b82040a72b0059ae00855a74d8570ad2147"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b662d858131da9a8a14e68661656989b14dbf113"
                }
            ],
            "title": "Revert \"libfs: fix infinite directory reads for offset dir\"",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 5.5,
                            "attackVector": "LOCAL",
                            "baseSeverity": "MEDIUM",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
                            "integrityImpact": "NONE",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "NONE"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2024-57952",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2025-10-01T19:51:08.146468Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "description": "CWE-noinfo Not enough information"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2025-10-01T19:57:09.380Z"
                }
            }
        ]
    }
}