KernelScan.io

HIGH Introduced in 7.0

fsverity HashChain UAF

CVE-2026-99051

CVSS 7.8 / 10.0 NVD

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

KernelScan AI7.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: fsverity: RCU-delay the freeing of struct fsverity_info __fsverity_get_info() calls rhashtable_lookup_fast(), which just uses rcu_read_lock() and doesn't directly synchronize with fsverity_remove_info(). For the same inode this isn't a problem: its fsverity_info is removed only at inode eviction time or upon failure to enable verity, when the inode no longer needs its fsverity_info and it will no longer be accessed via that inode. However, this is broken and can cause a use-after-free for concurrent __fsverity_get_info() for *different* inodes. Those rely on following fsverity_info::rhash_head in the rhashtable under rcu_read_lock() only. They also use fsverity_info::inode to do the key comparison. Fix this by RCU-delaying the freeing of 'struct fsverity_info' after it's been removed from the rhashtable.

02

Engine v0.9.0

Risk summary

A local attacker who can trigger concurrent fsverity operations on different files sharing a hash bucket can exploit a use-after-free in the kernel's fsverity metadata cache. Successful exploitation allows arbitrary kernel memory read and write, leading to privilege escalation or kernel crash. The bug requires a race condition between inode eviction and hash-chain traversal, making it non-trivial but reliably exploitable with heap grooming.

Affectedfs/verity/open.c (fsverity subsystem)

Vulnerability analysis

The fsverity subsystem uses a global resizable hash table (rhashtable) to track per-inode verification metadata (struct fsverity_info). When an inode is evicted or verity enablement fails, fsverity_remove_info() unlinks the object from the hash table and immediately frees it. However, lookups for other inodes in the same hash chain traverse the chain under only rcu_read_lock(), meaning they can still be dereferencing the rhash_head and inode pointers of the just-freed object. The fix replaces the immediate free with an RCU callback (call_rcu), delaying reclamation until all pre-existing RCU read-side critical sections have completed. This closes the use-after-free window while preserving the lockless lookup fast path. The vulnerability is reachable by any local user who can operate on fsverity-enabled files — no special privileges beyond normal file access are required once verity is enabled on the relevant files.

03

BranchIntroducedFixed inPatch commit
7.27.07.2.11fa84f091a8e7
mainline7.07.3e58c3805ed32