ZeroHour

CVE-2026-89723

niche

Slab-Out-of-Bounds in Linux Kernel nilfs2 Filesystem After File Truncation

CVSS 3.1
7.8 high
EPSS
Published
()
Modified
AI analysis

CVE-2026-89723 is a slab-out-of-bounds flaw in the Linux kernel's nilfs2 filesystem, reported via a KASAN-detected error in nilfs_direct_propagate(). When a file is truncated on a nilfs2 volume, the B-tree mapping can collapse into a direct mapping while leaving a residual intermediate node block in the node cache in a dirty state; the log writer later misidentifies this block as a direct-mapped data block and processes it, reading and writing past the bounds of the allocated slab object. A local, low-privileged user who can create and truncate files on a nilfs2 filesystem can trigger this kernel memory corruption, with CVSS 3.1 impact ratings of high for confidentiality, integrity, and availability (score 7.8) — in practice, at minimum a kernel crash and potentially worse memory-corruption consequences. Only systems running kernels that contain the vulnerable nilfs2 code AND actually mount/use nilfs2 filesystems are exposed, which is a small subset of Linux installations. No public proof of concept exists, and there is no evidence of exploitation in the wild; the issue is not on the CISA KEV list. The fix adds a nilfs_btree_discard() operation and a 'deform' flag to the bop_delete interface so the orphaned node block is explicitly deleted during the mapping transition.

What to do: Apply kernel updates from your distribution as soon as the nilfs2 fix (the commit adding nilfs_btree_discard() and the 'deform' flag to bop_delete) is backported. Inventory for exposure with 'lsblk -f', 'mount | grep nilfs2', or '/proc/filesystems' and prioritize patching any hosts with nilfs2 mounts. If nilfs2 is not used on a host, blacklist the module (e.g., an 'install nilfs2 /bin/false' line in modprobe.d) to close off the vulnerable code path; watch kernel logs for KASAN splats referencing nilfs_direct_propagate.

Affected
Linux kernel (nilfs2 filesystem subsystem)
Estimated exposure
niche≈tens of thousands of systems at most — only hosts actively mounting nilfs2 filesystems; most Linux installs merely ship the code as an unused module — nilfs2 is a niche log-structured filesystem that is rarely the default on mainstream distributions (ext4/xfs/btrfs dominate), the vulnerable code path only triggers on systems actually truncating files on nilfs2 volumes, and exploitation…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix slab-out-of-bounds in nilfs_direct_propagate after truncation Shuangpeng Bai reported that KASAN detected a slab-out-of-bounds error in nilfs_direct_propagate() during testing. Analysis revealed that after truncating a file, a node block immediately below the B-tree root was not deleted. Instead, it remained in the B-tree node cache in a dirty state. The log writer subsequently detected this block and incorrectly invoked nilfs_direct_propagate() on it, which is designed to handle only data blocks in direct mapping. B-tree nodes in the cache are managed by virtual block numbers, and their logical keys typically exceed the range expected by direct mapping. Consequently, processing such a node as a direct mapping entry triggers a slab-out-of-bounds access. The root cause is that when a B-tree mapping collapses into a direct mapping during truncation, an intermediate node block pointed to by the root node is left behind as garbage instead of being explicitly deleted. This resolves the issue by adding a nilfs_btree_discard() operation to delete the remaining intermediate node block during the conversion. A 'deform' flag is added to the bop_delete interface to explicitly signal that the deletion is part of a mapping transformation. This allows the B-tree mapping implementation to perform the necessary cleanup and discarding of the residual node structure that would be otherwise be left orphaned after the transition.

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

In the news

No ingested article mentions this CVE yet.