CVE-2026-138871

nilfs2: validate directory position after llseek in readdir

9.1 critical EPSS 1.38%

Published 30 Nov 2026 Updated 1 Dec 2026 CNA: Linux

Check your servers for CVE-2026-138871

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-138871 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.

Check my servers

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]

Severity (CVSS)

9.1 critical CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 1.38%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 72.9% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before 69cf95f47a68b6920c9192a5ea3fe8c1db0a1070
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before 07f671d13067e68dbc840e46027668293c1c3a80
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before a48632160cdb85adadb4b7c8429d90a9511e7e6b
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before dc171da15e46871abac4c05b389730883c15f680
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before 7bcffd24502d637b348a2e460093a0cabad4554e
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before fbcbb54a4898984192b16764943af1be262bdb4d
affected from 2ba466d74ed74f073257f86e61519cb8f8f46184, before de7f49c12566cc5c7437a2f26c6c754b9d4d5648
Other versions: unaffected
Linux
affected 2.6.30
unaffected before 2.6.30
unaffected from 5.10.275 up to and including 5.10.*
unaffected from 5.15.226 up to and including 5.15.*
unaffected from 6.1.193 up to and including 6.1.*
unaffected from 6.6.163 up to and including 6.6.*
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-138871 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138871

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-138871
trivy image --scanners vuln IMAGE | grep CVE-2026-138871

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

Source: the record CVE-2026-138871 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.