CVE-2026-68148 (GCVE-0-2026-68148)
Vulnerability from cvelistv5
Published
2026-08-10 11:59
Modified
2026-08-19 16:30
Summary
In the Linux kernel, the following vulnerability has been resolved: fscrypt: Add missing superblock check in find_or_insert_direct_key() The legacy 'fscrypt_direct_keys' table caches master keys that are used by v1 encryption policies that have FSCRYPT_POLICY_FLAG_DIRECT_KEY. 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 super_block::s_master_keys). The entries in it ('struct fscrypt_direct_key') do contain a super_block pointer, though, for passing to fscrypt_destroy_inline_crypt_key() when the last inode that references the key is evicted. However, when finding the fscrypt_direct_key for an inode, we weren't actually comparing the super_block pointer. As a result, inodes with different super_blocks could point to the same fscrypt_direct_key. That could extend the lifetime of a fscrypt_direct_key beyond the super_block it points to, causing a use-after-free later. Fix this by creating distinct fscrypt_direct_key structs for distinct super_block structs. Note that this problem doesn't exist in the v2 policy equivalent ("per-mode keys"), since the data structures there are per super_block.
Impacted products
Vendor Product Version
Linux Linux Version: 22e9947a4b2ba255888541bd0111cf00b9b16586
Version: 22e9947a4b2ba255888541bd0111cf00b9b16586
Version: 22e9947a4b2ba255888541bd0111cf00b9b16586
Version: 22e9947a4b2ba255888541bd0111cf00b9b16586
Version: 22e9947a4b2ba255888541bd0111cf00b9b16586
Version: 22e9947a4b2ba255888541bd0111cf00b9b16586
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/crypto/keysetup_v1.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "965b5bc8cf5031225e057979ce660fec2bd5fbfc",
              "status": "affected",
              "version": "22e9947a4b2ba255888541bd0111cf00b9b16586",
              "versionType": "git"
            },
            {
              "lessThan": "330249609b70778094a7a36f5b6bcfa6362121d4",
              "status": "affected",
              "version": "22e9947a4b2ba255888541bd0111cf00b9b16586",
              "versionType": "git"
            },
            {
              "lessThan": "deff41898a5ae3a47db5fa1896a494aa95efda5d",
              "status": "affected",
              "version": "22e9947a4b2ba255888541bd0111cf00b9b16586",
              "versionType": "git"
            },
            {
              "lessThan": "95376fe9c145be35566991df99c53134943d992f",
              "status": "affected",
              "version": "22e9947a4b2ba255888541bd0111cf00b9b16586",
              "versionType": "git"
            },
            {
              "lessThan": "466f187b501a5ac8e1ea2ccf3ccd5c46108d8830",
              "status": "affected",
              "version": "22e9947a4b2ba255888541bd0111cf00b9b16586",
              "versionType": "git"
            },
            {
              "lessThan": "b5fa40226e71c17847b9ff2816c6ca4133d0d994",
              "status": "affected",
              "version": "22e9947a4b2ba255888541bd0111cf00b9b16586",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/crypto/keysetup_v1.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.1"
            },
            {
              "lessThan": "6.1",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.183",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.148",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.101",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.42",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.183",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.148",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.101",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.42",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.6",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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 \u0027fscrypt_direct_keys\u0027 table caches master keys that are used\nby v1 encryption policies that have FSCRYPT_POLICY_FLAG_DIRECT_KEY.\nIt\u0027s 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 (\u0027struct fscrypt_direct_key\u0027) 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\u0027t\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\u0027t exist in the v2 policy equivalent\n(\"per-mode keys\"), since the data structures there are per super_block."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "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 -\u003e 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": {
        "dateUpdated": "2026-08-19T16:30:13.417Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
        }
      ],
      "title": "fscrypt: Add missing superblock check in find_or_insert_direct_key()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-68148",
    "datePublished": "2026-08-10T11:59:13.413Z",
    "dateReserved": "2026-07-30T09:28:09.371Z",
    "dateUpdated": "2026-08-19T16:30:13.417Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…