Skip to content
DayZeroHub
Critical Not yet writtenCVSS 9.1CVE-2026-138871

CVE-2026-138871: nilfs2: validate directory position after llseek in readdir

Linux Linux

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-138871: critical-severity vulnerability (CVSS 9.1) in Linux Linux.

What happened

Original description from the source: 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]

Why it matters

Critical severity, CVSS 9.1.

Affected products and versions

Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5; Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < 69cf95f47a68b6920c9192a5ea3fe8c1db0a1070; Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < 07f671d13067e68dbc840e46027668293c1c3a80; Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < a48632160cdb85adadb4b7c8429d90a9511e7e6b; Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < dc171da15e46871abac4c05b389730883c15f680; Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < 7bcffd24502d637b348a2e460093a0cabad4554e; Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < fbcbb54a4898984192b16764943af1be262bdb4d; Linux Linux >= 2ba466d74ed74f073257f86e61519cb8f8f46184, < de7f49c12566cc5c7437a2f26c6c754b9d4d5648; Linux Linux 2.6.30; Linux Linux < 2.6.30; Linux Linux 5.10.275 (fixed in 5.10.275); Linux Linux 5.15.226 (fixed in 5.15.226)

ProductVersionsFixed in
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5—
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < 69cf95f47a68b6920c9192a5ea3fe8c1db0a1070—
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < 07f671d13067e68dbc840e46027668293c1c3a80—
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < a48632160cdb85adadb4b7c8429d90a9511e7e6b—
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < dc171da15e46871abac4c05b389730883c15f680—
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < 7bcffd24502d637b348a2e460093a0cabad4554e—
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < fbcbb54a4898984192b16764943af1be262bdb4d—
Linux Linux>= 2ba466d74ed74f073257f86e61519cb8f8f46184, < de7f49c12566cc5c7437a2f26c6c754b9d4d5648—
Linux Linux2.6.30—
Linux Linux< 2.6.30—
Linux Linux5.10.2755.10.275
Linux Linux5.15.2265.15.226
Linux Linux6.1.1936.1.193
Linux Linux6.6.1636.6.163
Linux Linux6.12.1176.12.117
Linux Linux6.18.636.18.63
Linux Linux7.3.47.3.4
Linux Linux7.4-rc17.4-rc1

Action recommended by the source

Upgrade to a fixed version: 5.10.275, 5.15.226, 6.1.193, 6.12.117, 6.18.63, 6.6.163, 7.3.4, 7.4-rc1.

Fixed in: 5.10.275, 5.15.226, 6.1.193, 6.12.117, 6.18.63, 6.6.163, 7.3.4, 7.4-rc1

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Relevant change history

  1. Published

    Preliminary advisory published.