nilfs2: validate directory position after llseek in readdir

Summary

CVECVE-2026-138871
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:17:43 UTC
Updated2026-12-01 06:17:29 UTC
DescriptionIn 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]

Risk And Classification

Primary CVSS: v3.1 9.1 CRITICAL from 416baaa9-dc9f-4396-8d5f-8c081fb06d67

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H


VersionSourceTypeScoreSeverityVector
3.1416baaa9-dc9f-4396-8d5f-8c081fb06d67Secondary9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
3.1CNADECLARED9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5 git Not specified
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 69cf95f47a68b6920c9192a5ea3fe8c1db0a1070 git Not specified
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 07f671d13067e68dbc840e46027668293c1c3a80 git Not specified
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 a48632160cdb85adadb4b7c8429d90a9511e7e6b git Not specified
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 dc171da15e46871abac4c05b389730883c15f680 git Not specified
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 7bcffd24502d637b348a2e460093a0cabad4554e git Not specified
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 fbcbb54a4898984192b16764943af1be262bdb4d git Not specified
CNA Linux Linux affected 2ba466d74ed74f073257f86e61519cb8f8f46184 de7f49c12566cc5c7437a2f26c6c754b9d4d5648 git Not specified
CNA Linux Linux affected 2.6.30 Not specified
CNA Linux Linux unaffected 2.6.30 semver Not specified
CNA Linux Linux unaffected 5.10.275 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.226 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.193 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.163 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.117 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.63 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.4 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/bdfc5b64f8f606df9c1dc18c2e00200884c8e6f5 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/de7f49c12566cc5c7437a2f26c6c754b9d4d5648 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/a48632160cdb85adadb4b7c8429d90a9511e7e6b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/07f671d13067e68dbc840e46027668293c1c3a80 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/7bcffd24502d637b348a2e460093a0cabad4554e 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/fbcbb54a4898984192b16764943af1be262bdb4d 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/69cf95f47a68b6920c9192a5ea3fe8c1db0a1070 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/dc171da15e46871abac4c05b389730883c15f680 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report