CVE-2026-100027
lib/buildid: reject file offsets that do not fit in pgoff_t
Check your servers for CVE-2026-100027
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-100027 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
lib/buildid: reject file offsets that do not fit in pgoff_t
On a 32-bit kernel, parsing the build ID of a crafted ELF file can copy far more than the intended bytes into a 64-byte on-stack buffer in __build_id_parse(), corrupting the stack of whatever context fetches the build ID. This might be reachable without privilege: perf records a build ID for PERF_RECORD_MMAP2 on the no-fault path when a process mmaps its own file (build_id_parse_nofault() from perf_event_mmap()), and BPF build-id stack maps do the same.
freader_get_folio() turns a 64-bit file offset into a page cache index with file_off >> PAGE_SHIFT and passes it to filemap_get_folio(). pgoff_t is unsigned long, 32-bit on a 32-bit kernel, so an ELF64 e_phoff of 2^44 + k * PAGE_SIZE truncates to index k. filemap_get_folio() returns the cached folio at index k, whose folio_pos() is far below the requested file_off. In freader_fetch() the folio does not contain file_off, so the "crossing folio boundaries" path computes part_sz = folio_off + folio_sz - file_off as a large u64 (file_off is much larger), and the following memcpy() truncates it to size_t and copies a page into the 64-byte buffer. On a 64-bit kernel the index is not truncated, the folio is not cached and the fetch returns -EFAULT, so only 32-bit kernels are affected.
Reject a file offset that cannot be represented as a page cache index before the lookup, so such a file fails the build ID parse cleanly as it already does on 64-bit.
Reproduced on i386 under QEMU with CONFIG_STACKPROTECTOR_STRONG: mmapping a crafted ELF (ELFCLASS64, e_phoff = 2^44) while a perf event with attr.build_id is open panics with "stack-protector: Kernel stack is corrupted in: __build_id_parse"; with this patch the parse returns -EFAULT and the mmap completes cleanly. Built for i386 with W=1, no new warnings.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.18%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 7.33% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from de3ec364c3c37971dbba1e37a55ae5b646c6f24e, before 3e385811176cd7968b0ad687a4118e90632018f4 affected from de3ec364c3c37971dbba1e37a55ae5b646c6f24e, before 78b8738d6656acec8a0d812bf826a9a412f16971 affected from de3ec364c3c37971dbba1e37a55ae5b646c6f24e, before 34bd3e5f44a327e15c1a6513bae8267bda19b43f affected from de3ec364c3c37971dbba1e37a55ae5b646c6f24e, before 0007654a7bf13ef2a19afd398bbc6507087f19fd
Other versions: unaffected
|
| Linux |
affected 6.12 unaffected before 6.12 unaffected from 6.12.117 up to and including 6.12.* unaffected from 6.18.63 up to and including 6.18.* unaffected from 7.3.4 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-100027 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-100027
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-100027
trivy image --scanners vuln IMAGE | grep CVE-2026-100027
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/3e385811176cd7968b0ad687a4118e90632018f4 git.kernel.org
- https://git.kernel.org/stable/c/78b8738d6656acec8a0d812bf826a9a412f16971 git.kernel.org
- https://git.kernel.org/stable/c/34bd3e5f44a327e15c1a6513bae8267bda19b43f git.kernel.org
- https://git.kernel.org/stable/c/0007654a7bf13ef2a19afd398bbc6507087f19fd git.kernel.org
Source: the record CVE-2026-100027 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse