{"id":"CVE-2026-68148","state":"PUBLISHED","title":"fscrypt: Add missing superblock check in find_or_insert_direct_key()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nfscrypt: Add missing superblock check in find_or_insert_direct_key()\n\nThe legacy 'fscrypt_direct_keys' table caches master keys that are used\nby v1 encryption policies that have FSCRYPT_POLICY_FLAG_DIRECT_KEY.\nIt's just a global table for all filesystems (since the keys can be\nprovided by the legacy process-subscribed keyrings mechanism, which\nmakes it difficult to reuse super_block::s_master_keys).\n\nThe entries in it ('struct fscrypt_direct_key') do contain a super_block\npointer, though, for passing to fscrypt_destroy_inline_crypt_key() when\nthe last inode that references the key is evicted.\n\nHowever, when finding the fscrypt_direct_key for an inode, we weren't\nactually comparing the super_block pointer.  As a result, inodes with\ndifferent super_blocks could point to the same fscrypt_direct_key.  That\ncould extend the lifetime of a fscrypt_direct_key beyond the\nsuper_block it points to, causing a use-after-free later.\n\nFix this by creating distinct fscrypt_direct_key structs for distinct\nsuper_block structs.\n\nNote that this problem doesn't exist in the v2 policy equivalent\n(\"per-mode keys\"), since the data structures there are per super_block.","publishedAt":"2026-08-10T11:59:13.413Z","updatedAt":"2026-10-19T20:58:54.031Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"965b5bc8cf5031225e057979ce660fec2bd5fbfc","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"330249609b70778094a7a36f5b6bcfa6362121d4","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"deff41898a5ae3a47db5fa1896a494aa95efda5d","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"95376fe9c145be35566991df99c53134943d992f","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"466f187b501a5ac8e1ea2ccf3ccd5c46108d8830","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"b5fa40226e71c17847b9ff2816c6ca4133d0d994","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/crypto/keysetup_v1.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.183","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.148","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/crypto/keysetup_v1.c"]}],"references":["https://git.kernel.org/stable/c/965b5bc8cf5031225e057979ce660fec2bd5fbfc","https://git.kernel.org/stable/c/330249609b70778094a7a36f5b6bcfa6362121d4","https://git.kernel.org/stable/c/deff41898a5ae3a47db5fa1896a494aa95efda5d","https://git.kernel.org/stable/c/95376fe9c145be35566991df99c53134943d992f","https://git.kernel.org/stable/c/466f187b501a5ac8e1ea2ccf3ccd5c46108d8830","https://git.kernel.org/stable/c/b5fa40226e71c17847b9ff2816c6ca4133d0d994"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/68xxx/CVE-2026-68148.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68148","state":"PUBLISHED","datePublished":"2026-08-10T11:59:13.413Z","dateUpdated":"2026-10-19T20:58:54.031Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-30T09:28:09.371Z"},"containers":{"cna":{"title":"fscrypt: Add missing superblock check in find_or_insert_direct_key()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nfscrypt: Add missing superblock check in find_or_insert_direct_key()\n\nThe legacy 'fscrypt_direct_keys' table caches master keys that are used\nby v1 encryption policies that have FSCRYPT_POLICY_FLAG_DIRECT_KEY.\nIt's just a global table for all filesystems (since the keys can be\nprovided by the legacy process-subscribed keyrings mechanism, which\nmakes it difficult to reuse super_block::s_master_keys).\n\nThe entries in it ('struct fscrypt_direct_key') do contain a super_block\npointer, though, for passing to fscrypt_destroy_inline_crypt_key() when\nthe last inode that references the key is evicted.\n\nHowever, when finding the fscrypt_direct_key for an inode, we weren't\nactually comparing the super_block pointer.  As a result, inodes with\ndifferent super_blocks could point to the same fscrypt_direct_key.  That\ncould extend the lifetime of a fscrypt_direct_key beyond the\nsuper_block it points to, causing a use-after-free later.\n\nFix this by creating distinct fscrypt_direct_key structs for distinct\nsuper_block structs.\n\nNote that this problem doesn't exist in the v2 policy equivalent\n(\"per-mode keys\"), since the data structures there are per super_block."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"965b5bc8cf5031225e057979ce660fec2bd5fbfc","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"330249609b70778094a7a36f5b6bcfa6362121d4","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"deff41898a5ae3a47db5fa1896a494aa95efda5d","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"95376fe9c145be35566991df99c53134943d992f","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"466f187b501a5ac8e1ea2ccf3ccd5c46108d8830","versionType":"git"},{"version":"22e9947a4b2ba255888541bd0111cf00b9b16586","status":"affected","lessThan":"b5fa40226e71c17847b9ff2816c6ca4133d0d994","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/crypto/keysetup_v1.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.183","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.148","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/crypto/keysetup_v1.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/965b5bc8cf5031225e057979ce660fec2bd5fbfc"},{"url":"https://git.kernel.org/stable/c/330249609b70778094a7a36f5b6bcfa6362121d4"},{"url":"https://git.kernel.org/stable/c/deff41898a5ae3a47db5fa1896a494aa95efda5d"},{"url":"https://git.kernel.org/stable/c/95376fe9c145be35566991df99c53134943d992f"},{"url":"https://git.kernel.org/stable/c/466f187b501a5ac8e1ea2ccf3ccd5c46108d8830"},{"url":"https://git.kernel.org/stable/c/b5fa40226e71c17847b9ff2816c6ca4133d0d994"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The flaw is reached only through local syscalls (mount/umount, FS_IOC_SET_ENCRYPTION_POLICY, and file I/O that calls fscrypt_get_encryption_info -> find_or_insert_direct_key); fscrypt is not invoked from network-facing kernel services.\nAC:L - An attacker who can mount two encrypted filesystems with the same v1 DIRECT_KEY master key, share the global cache entry, then unmount the first superblock can deterministically trigger eviction-time cleanup on a freed super_block without races or victim-dependent timing.\nPR:L - Exploitation requires mounting/unmounting filesystems and setting v1 DIRECT_KEY policies (CAP_SYS_ADMIN in a user/mount namespace) or supplying keys via process keyrings; per kernel guidance, CAP_SYS_ADMIN obtainable in user namespaces maps to PR:L.\nUI:N - No separate victim action is required; the attacker sets v1 DIRECT_KEY policies, accesses encrypted inodes on two mounts, and controls unmount/eviction to hit the vulnerable refcount and cleanup path.\nS:U - The use-after-free corrupts kernel heap memory and enables local privilege escalation within the same kernel; it does not cross VM, hypervisor, or IOMMU security boundaries.\nC:H - Extending a fscrypt_direct_key past its super_block lifetime causes cleanup to dereference a freed super_block in fscrypt_destroy_inline_crypt_key(), a use-after-free that can leak kernel memory and support arbitrary-read exploitation primitives.\nI:H - Use-after-free during inline-crypto key destruction on a dangling super_block pointer can be leveraged for heap corruption and arbitrary kernel writes, enabling local privilege escalation rather than only a controlled crash.\nA:H - Evicting the last inode holding the mismatched fscrypt_direct_key dereferences a freed super_block during key teardown, which can cause kernel oops/panic and complete local denial of service on encrypted mobile/embedded and server systems using inline encryption."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-19T16:30:13.417Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.183"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.6.148"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.12.101"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.18.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-68148","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:44:51.705940Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T20:58:54.031Z"}}]}}}