fsverity: RCU-delay the freeing of struct fsverity_info
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 7.2.11
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- First seen by cve.now
- Record last updated
Affected versions
- Linux Linux
From f77f281b61183a5c0b87e6a4d101c70bd32c1c79 · fixed in fa84f091a8e7fc46fd29834496fab9739dd4c8dc; From f77f281b61183a5c0b87e6a4d101c70bd32c1c79 · fixed in e58c3805ed325fe2d4ae2dd467c0486cc860b733
- Linux Linux
7.0
- KernelLinux
From 7.0.0 · fixed in 7.2.11