nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e912a5b66837ee89fb025e67b5efeaa11930c2ce · < acc2a40e428f12780004e1e9fce4722d88f909fd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
During unmount process of nilfs2, nothing holds nilfs_root structure after nilfs2 detaches its writer in nilfs_detach_log_writer(). However, since nilfs_evict_inode() uses nilfs_root for some cleanup operations, it may cause use-after-free read if inodes are left in "garbage_list" and released by nilfs_dispose_list() at the end of nilfs_detach_log_writer().
Fix this issue by modifying nilfs_evict_inode() to only clear inode without additional metadata changes that use nilfs_root if the file system is degraded to read-only or the writer is detached.
From the CVE record · Linux
The Linux kernel's nilfs2 filesystem can read a freed nilfs_root structure during unmount if inodes remain in the garbage_list. This can occur when those inodes are released after nilfs2 detaches its writer; the input does not specify attacker access or user-interaction requirements.
Engineers running Linux kernels with nilfs2 should check their installations; affected versions are not specified.