{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-100027",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.453Z",
        "datePublished": "2026-11-30T13:23:12.416Z",
        "dateUpdated": "2026-11-30T13:23:12.416Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:23:12.416Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nlib/buildid: reject file offsets that do not fit in pgoff_t\n\nOn a 32-bit kernel, parsing the build ID of a crafted ELF file can copy\nfar more than the intended bytes into a 64-byte on-stack buffer in\n__build_id_parse(), corrupting the stack of whatever context fetches the\nbuild ID.  This might be reachable without privilege: perf records a build ID\nfor PERF_RECORD_MMAP2 on the no-fault path when a process mmaps its own file\n(build_id_parse_nofault() from perf_event_mmap()), and BPF build-id stack\nmaps do the same.\n\nfreader_get_folio() turns a 64-bit file offset into a page cache index\nwith file_off >> PAGE_SHIFT and passes it to filemap_get_folio().\npgoff_t is unsigned long, 32-bit on a 32-bit kernel, so an ELF64 e_phoff\nof 2^44 + k * PAGE_SIZE truncates to index k.  filemap_get_folio()\nreturns the cached folio at index k, whose folio_pos() is far below the\nrequested file_off.  In freader_fetch() the folio does not contain\nfile_off, so the \"crossing folio boundaries\" path computes\npart_sz = folio_off + folio_sz - file_off as a large u64 (file_off is\nmuch larger), and the following memcpy() truncates it to size_t and\ncopies a page into the 64-byte buffer.  On a 64-bit kernel the index is\nnot truncated, the folio is not cached and the fetch returns -EFAULT, so\nonly 32-bit kernels are affected.\n\nReject a file offset that cannot be represented as a page cache index\nbefore the lookup, so such a file fails the build ID parse cleanly as it\nalready does on 64-bit.\n\nReproduced on i386 under QEMU with CONFIG_STACKPROTECTOR_STRONG: mmapping\na crafted ELF (ELFCLASS64, e_phoff = 2^44) while a perf event with\nattr.build_id is open panics with \"stack-protector: Kernel stack is\ncorrupted in: __build_id_parse\"; with this patch the parse returns\n-EFAULT and the mmap completes cleanly.  Built for i386 with W=1, no new\nwarnings."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "lib/buildid.c"
                    ],
                    "versions": [
                        {
                            "version": "de3ec364c3c37971dbba1e37a55ae5b646c6f24e",
                            "lessThan": "3e385811176cd7968b0ad687a4118e90632018f4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "de3ec364c3c37971dbba1e37a55ae5b646c6f24e",
                            "lessThan": "78b8738d6656acec8a0d812bf826a9a412f16971",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "de3ec364c3c37971dbba1e37a55ae5b646c6f24e",
                            "lessThan": "34bd3e5f44a327e15c1a6513bae8267bda19b43f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "de3ec364c3c37971dbba1e37a55ae5b646c6f24e",
                            "lessThan": "0007654a7bf13ef2a19afd398bbc6507087f19fd",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "lib/buildid.c"
                    ],
                    "versions": [
                        {
                            "version": "6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.12",
                            "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": "6.12",
                                    "versionEndExcluding": "6.12.117"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "6.18.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "7.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/3e385811176cd7968b0ad687a4118e90632018f4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/78b8738d6656acec8a0d812bf826a9a412f16971"
                },
                {
                    "url": "https://git.kernel.org/stable/c/34bd3e5f44a327e15c1a6513bae8267bda19b43f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0007654a7bf13ef2a19afd398bbc6507087f19fd"
                }
            ],
            "title": "lib/buildid: reject file offsets that do not fit in pgoff_t",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}