CVE-2026-138871
Description
In the Linux kernel, the following vulnerability has been resolved: nilfs2: validate directory position after llseek in readdir nilfs_readdir() uses ctx->pos, which userspace can set to an arbitrary value via llseek, as an offset into the directory folio and parses whatever bytes sit there as a directory entry. A position pointing into the middle of an entry -- or at unused bytes of a corrupted image that the page validator never inspected -- makes dir_emit() copy up to 255 (name_len) bytes from a bogus entry, possibly reading past the end of the folio and returning unrelated memory contents to userspace. Snap unaligned positions onto a valid entry boundary by walking the rec_len chain from the chunk start before parsing, as ext2 does in ext2_validate_entry(). [ryusuke: fixed offset wrap-around in nilfs_validate_entry() and conformed AI tag to guidelines]
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Mitigation details
CVE-2026-138871 NameCVE-2026-138871 Descriptionnilfs2: validate directory position after llseek in readdir SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) Vulnerable and fixed packages The table below lists information on source packages. Source PackageReleaseVersionStatus linux…
CVE-2026-138871
| Name | CVE-2026-138871 |
| Description | nilfs2: validate directory position after llseek in readdir |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| linux (PTS) | bookworm | 6.1.176-1 | vulnerable |
| bookworm (security) | 6.1.192-3 | vulnerable | |
| trixie | 6.12.117-1 | fixed | |
| trixie (security) | 6.12.118-1 | fixed | |
| forky, sid | 7.3.6-1 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| linux | source | trixie | 6.12.117-1 | |||
| linux | source | (unstable) | 7.3.4-1 |
Notes
https://git.kernel.org/linus/de7f49c12566cc5c7437a2f26c6c754b9d4d5648 (7.4-rc1)
Apply commands
https://git.kernel.org/linus/de7f49c12566cc5c7437a2f26c6c754b9d4d5648 (7.4-rc1)
OS impact
Debian Mixed 4 releases
| Version | Package | Status | Fixed in |
|---|---|---|---|
| trixie | linux |
Fixed | 6.12.117-1 |
| sid | linux |
Fixed | 7.3.4-1 |
| forky | linux |
Fixed | 7.3.4-1 |
| bookworm | linux |
Affected | — |
SUSE Tracked 1 release
| Version | Package | Status | Fixed in |
|---|---|---|---|
| — | — | Unknown | — |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| linux | linux | 2.6.30 | |
References
- https://git.kernel.org/stable/c/07f671d13067e68dbc840e46027668293c1c3a80
- https://git.kernel.org/stable/c/69cf95f47a68b6920c9192a5ea3fe8c1db0a1070
- https://git.kernel.org/stable/c/7bcffd24502d637b348a2e460093a0cabad4554e
- https://git.kernel.org/stable/c/a48632160cdb85adadb4b7c8429d90a9511e7e6b
- https://git.kernel.org/stable/c/bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5
- https://git.kernel.org/stable/c/dc171da15e46871abac4c05b389730883c15f680
- https://git.kernel.org/stable/c/de7f49c12566cc5c7437a2f26c6c754b9d4d5648
- https://git.kernel.org/stable/c/fbcbb54a4898984192b16764943af1be262bdb4d
- https://security-tracker.debian.org/tracker/CVE-2026-138871
- https://www.suse.com/security/cve/CVE-2026-138871.html
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.