CVE-2026-139473: nilfs2: reject non-regular inodes in dsync recovery
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: reject non-regular inodes in dsync recovery
During roll-forward recovery, nilfsrecoverdsyncblocks() obtains the inode designated by fiino of a dsync log without checking its type. If a corrupted image designates a special inode (e.g. a device node) there, the inode's embedded bmap was never initialized: nilfsreadinode() calls nilfsbmapread() only for regular files, directories and symlinks. The subsequent nilfsgetblock() then dereferences the uninitialized bmap->bops and jumps through it, crashing the kernel or worse.
Regular files, directories, and symlinks are the only inode types with data blocks to recover; reject anything else before touching its block mapping.
[ryusuke: conformed AI tag to guidelines]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
During NILFS2 dsync recovery, reject inode types other than regular files, directories, and symlinks before accessing their block mappings.
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The system must perform roll-forward recovery on a NILFS2 filesystem image whose dsync log has been corrupted to designate a special inode, such as a device node, through fi_ino. The vulnerable recovery path then attempts block mapping on an inode whose mapping structures were not initialized.
What is the practical impact during recovery?
The recovery path can dereference an uninitialized bmap->b_ops function pointer when nilfs_get_block() is called. This can crash the kernel and may have more severe consequences.
Which inode types are relevant to the affected recovery path?
Only regular files, directories, and symbolic links have data blocks that need recovery. Special inode types should be rejected before the code accesses their block mapping.
How can this be mitigated if an update cannot be applied immediately?
Avoid mounting or recovering corrupted or untrusted NILFS2 filesystem images, particularly where roll-forward recovery may process manipulated dsync logs.