CVE-2026-68148: fscrypt: Add missing superblock check in find_or_insert_direct_key()
In the Linux kernel, the following vulnerability has been resolved:
fscrypt: Add missing superblock check in findorinsertdirectkey()
The legacy 'fscryptdirectkeys' table caches master keys that are used by v1 encryption policies that have FSCRYPTPOLICYFLAGDIRECTKEY. It's just a global table for all filesystems (since the keys can be provided by the legacy process-subscribed keyrings mechanism, which makes it difficult to reuse superblock::smasterkeys).
The entries in it ('struct fscryptdirectkey') do contain a superblock pointer, though, for passing to fscryptdestroyinlinecryptkey() when the last inode that references the key is evicted.
However, when finding the fscryptdirectkey for an inode, we weren't actually comparing the superblock pointer. As a result, inodes with different superblocks could point to the same fscryptdirectkey. That could extend the lifetime of a fscryptdirectkey beyond the superblock it points to, causing a use-after-free later.
Fix this by creating distinct fscryptdirectkey structs for distinct superblock structs.
Note that this problem doesn't exist in the v2 policy equivalent ("per-mode keys"), since the data structures there are per superblock.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68148?
CVE-2026-68148 has a risk rating of 47, indicating a significant vulnerability.
How do I fix CVE-2026-68148?
To fix CVE-2026-68148, you should update your Linux kernel to the latest patched version that resolves this vulnerability.
What systems are affected by CVE-2026-68148?
CVE-2026-68148 affects systems running vulnerable versions of the Linux kernel that implement the fscrypt mechanism.
What type of vulnerability is CVE-2026-68148?
CVE-2026-68148 is classified as a Use After Free vulnerability in the Linux kernel.
When was CVE-2026-68148 published?
CVE-2026-68148 was published on August 10, 2026.