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

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

nilfs2: validate directory position after llseek in readdir

nilfsreaddir() 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 diremit() copy up to 255 (namelen) 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 reclen chain from the chunk start before parsing, as ext2 does in ext2validateentry().

[ryusuke: fixed offset wrap-around in nilfsvalidateentry() and conformed AI tag to guidelines]

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203