{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-138871",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.900Z",
        "datePublished": "2026-11-30T13:25:46.106Z",
        "dateUpdated": "2026-11-30T13:25:46.106Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:25:46.106Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: validate directory position after llseek in readdir\n\nnilfs_readdir() uses ctx->pos, which userspace can set to an arbitrary\nvalue via llseek, as an offset into the directory folio and parses\nwhatever bytes sit there as a directory entry.  A position pointing\ninto the middle of an entry -- or at unused bytes of a corrupted image\nthat the page validator never inspected -- makes dir_emit() copy up to\n255 (name_len) bytes from a bogus entry, possibly reading past the end\nof the folio and returning unrelated memory contents to userspace.\n\nSnap unaligned positions onto a valid entry boundary by walking the\nrec_len chain from the chunk start before parsing, as ext2 does in\next2_validate_entry().\n\n[ryusuke: fixed offset wrap-around in nilfs_validate_entry() and\n conformed AI tag to guidelines]"
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nilfs2/dir.c"
                    ],
                    "versions": [
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "69cf95f47a68b6920c9192a5ea3fe8c1db0a1070",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "07f671d13067e68dbc840e46027668293c1c3a80",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "a48632160cdb85adadb4b7c8429d90a9511e7e6b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "dc171da15e46871abac4c05b389730883c15f680",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "7bcffd24502d637b348a2e460093a0cabad4554e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "fbcbb54a4898984192b16764943af1be262bdb4d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2ba466d74ed74f073257f86e61519cb8f8f46184",
                            "lessThan": "de7f49c12566cc5c7437a2f26c6c754b9d4d5648",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nilfs2/dir.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.30",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.30",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.275",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.117",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.63",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.4",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "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": "2.6.30",
                                    "versionEndExcluding": "5.10.275"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.12.117"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.18.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "7.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5"
                },
                {
                    "url": "https://git.kernel.org/stable/c/69cf95f47a68b6920c9192a5ea3fe8c1db0a1070"
                },
                {
                    "url": "https://git.kernel.org/stable/c/07f671d13067e68dbc840e46027668293c1c3a80"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a48632160cdb85adadb4b7c8429d90a9511e7e6b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/dc171da15e46871abac4c05b389730883c15f680"
                },
                {
                    "url": "https://git.kernel.org/stable/c/7bcffd24502d637b348a2e460093a0cabad4554e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fbcbb54a4898984192b16764943af1be262bdb4d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/de7f49c12566cc5c7437a2f26c6c754b9d4d5648"
                }
            ],
            "title": "nilfs2: validate directory position after llseek in readdir",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}