{"id":"CVE-2021-46922","state":"PUBLISHED","title":"KEYS: trusted: Fix TPM reservation for seal/unseal","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nKEYS: trusted: Fix TPM reservation for seal/unseal\n\nThe original patch 8c657a0590de (\"KEYS: trusted: Reserve TPM for seal\nand unseal operations\") was correct on the mailing list:\n\nhttps://lore.kernel.org/linux-integrity/20210128235621.127925-4-jarkko@kernel.org/\n\nBut somehow got rebased so that the tpm_try_get_ops() in\ntpm2_seal_trusted() got lost.  This causes an imbalanced put of the\nTPM ops and causes oopses on TIS based hardware.\n\nThis fix puts back the lost tpm_try_get_ops()","publishedAt":"2024-02-27T09:36:27.145Z","updatedAt":"2026-08-05T08:45:06.331Z","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":"67118bb78d72aab5b831f054a74ae856339a1974","status":"affected","lessThan":"bf84ef2dd2ccdcd8f2658476d34b51455f970ce4","versionType":"git"},{"version":"498b8fc1cdc13b57b02dd28544b18323900fae10","status":"affected","lessThan":"39c8d760d44cb3fa0d67e8cd505df81cf4d80999","versionType":"git"},{"version":"8c657a0590de585b1115847c17b34a58025f2f4b","status":"affected","lessThan":"9d5171eab462a63e2fbebfccf6026e92be018f20","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm2.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5.10.20","status":"affected","lessThan":"5.10.33","versionType":"semver"},{"version":"5.11.3","status":"affected","lessThan":"5.11.17","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm2.c"]}],"references":["https://git.kernel.org/stable/c/bf84ef2dd2ccdcd8f2658476d34b51455f970ce4","https://git.kernel.org/stable/c/39c8d760d44cb3fa0d67e8cd505df81cf4d80999","https://git.kernel.org/stable/c/9d5171eab462a63e2fbebfccf6026e92be018f20"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:16.371Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/46xxx/CVE-2021-46922.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-46922","state":"PUBLISHED","datePublished":"2024-02-27T09:36:27.145Z","dateUpdated":"2026-08-05T08:45:06.331Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-25T13:45:52.719Z"},"containers":{"cna":{"title":"KEYS: trusted: Fix TPM reservation for seal/unseal","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nKEYS: trusted: Fix TPM reservation for seal/unseal\n\nThe original patch 8c657a0590de (\"KEYS: trusted: Reserve TPM for seal\nand unseal operations\") was correct on the mailing list:\n\nhttps://lore.kernel.org/linux-integrity/20210128235621.127925-4-jarkko@kernel.org/\n\nBut somehow got rebased so that the tpm_try_get_ops() in\ntpm2_seal_trusted() got lost.  This causes an imbalanced put of the\nTPM ops and causes oopses on TIS based hardware.\n\nThis fix puts back the lost tpm_try_get_ops()"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"67118bb78d72aab5b831f054a74ae856339a1974","status":"affected","lessThan":"bf84ef2dd2ccdcd8f2658476d34b51455f970ce4","versionType":"git"},{"version":"498b8fc1cdc13b57b02dd28544b18323900fae10","status":"affected","lessThan":"39c8d760d44cb3fa0d67e8cd505df81cf4d80999","versionType":"git"},{"version":"8c657a0590de585b1115847c17b34a58025f2f4b","status":"affected","lessThan":"9d5171eab462a63e2fbebfccf6026e92be018f20","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm2.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5.10.20","status":"affected","lessThan":"5.10.33","versionType":"semver"},{"version":"5.11.3","status":"affected","lessThan":"5.11.17","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm2.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bf84ef2dd2ccdcd8f2658476d34b51455f970ce4"},{"url":"https://git.kernel.org/stable/c/39c8d760d44cb3fa0d67e8cd505df81cf4d80999"},{"url":"https://git.kernel.org/stable/c/9d5171eab462a63e2fbebfccf6026e92be018f20"}],"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 bug is reached via the local add_key/keyctl syscall path (trusted_instantiate → trusted_tpm_seal → tpm2_seal_trusted), not via network packets or physical device I/O.\nAC:L - An attacker can reliably trigger the imbalanced tpm_put_ops by creating a TPM2 trusted key (e.g. keyctl add trusted ... \"new 32\"); no race or attacker-uncontrollable condition is required, and put runs even when the TPM command fails.\nPR:L - Creating a trusted key requires only an unprivileged local account with write access to a keyring the caller possesses (documented as keyctl add trusted ... @u); there is no capability check in the trusted-key instantiate path.\nUI:N - The attacker invokes add_key/keyctl directly; no separate victim action is required.\nS:U - Impact is confined to the host kernel privilege domain (lock/refcount corruption and potential tpm_chip UAF); it does not cross a VM, IOMMU, or other security authority boundary.\nC:H - tpm_put_ops without a matching tpm_try_get_ops drops a real device reference via put_device and can free the still-referenced tpm_chip, yielding a heap use-after-free that can be leveraged for arbitrary memory disclosure.\nI:H - The same premature free of tpm_chip (which contains ops function pointers), plus unlocking an unheld tpm_mutex and up_read of ops_sem, enables heap reuse and control-flow hijacking primitives under UAF guidance.\nA:H - The fix commit documents kernel oopses on TIS hardware from the imbalanced put, and the resulting UAF/lock corruption can crash or destabilize the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:45:06.331Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.20","versionEndExcluding":"5.10.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11.3","versionEndExcluding":"5.11.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-07-25T16:00:18.491671Z","id":"CVE-2021-46922","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-25T16:00:29.336Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/bf84ef2dd2ccdcd8f2658476d34b51455f970ce4","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/39c8d760d44cb3fa0d67e8cd505df81cf4d80999","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/9d5171eab462a63e2fbebfccf6026e92be018f20","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:17:42.976Z"}}]}}}