{"id":"CVE-2026-89763","state":"PUBLISHED","title":"KEYS: trusted: Fix TPM teardown ordering","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nKEYS: trusted: Fix TPM teardown ordering\n\ntrusted_tpm_exit() drops the TPM chip reference and frees the digest\narray before unregistering the trusted key type. key_type_lookup()\nholds key_types_sem for reading until the key operation finishes, while\nunregister_key_type() takes it for writing. It therefore provides the\nsynchronization point that must precede backend teardown.\n\nThe current order permits this interleaving:\n\n  CPU 0                              CPU 1\n  trusted_tpm_exit()                 key_type_lookup(\"trusted\")\n    put_device(&chip->dev)             trusted_tpm_seal()\n    kfree(digests)                       pcrlock()\n    unregister_key_type()                  tpm_pcr_extend(..., digests)\n\nCPU 1 can consequently dereference the freed digest array. The chip can\nalso be released before callbacks stop using it.\n\nKASAN reported:\n\n  BUG: KASAN: slab-use-after-free in tpm_pcr_extend+0x1f0/0x200\n  Read of size 2 at addr ffff88810872d000 by task poc/89\n  Call Trace:\n    tpm_pcr_extend+0x1f0/0x200\n    pcrlock+0x42/0x70 [trusted]\n    trusted_tpm_seal+0x1b6/0x570 [trusted]\n    trusted_instantiate+0x293/0x340 [trusted]\n    __key_instantiate_and_link+0xb2/0x2b0\n    __key_create_or_update+0x61e/0xb50\n    __do_sys_add_key+0x1b8/0x310\n  Allocated by task 88:\n    __kmalloc_noprof+0x1a7/0x490\n    do_one_initcall+0xa1/0x390\n    do_init_module+0x2df/0x840\n  Freed by task 90:\n    kfree+0x131/0x3c0\n    trusted_tpm_exit+0x59/0xa0 [trusted]\n    __do_sys_delete_module+0x346/0x510\n\nMove unregister_key_type() before releasing either resource. This stops\nnew lookups and waits for in-flight key operations to finish before the\nbackend state is destroyed.","publishedAt":"2026-09-11T19:47:04.352Z","updatedAt":"2026-10-30T12:33:00.263Z","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":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"b254cdadbcb6bdd0daf7391d63b3b97b2bec1ad9","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"c96518231608bbf9568f539aadb20a8e366b54c7","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"6564808189c9a1e682ee7b5e70f5f1c73c89c3a4","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"81dfc6c665547a4e41721b6716f894f263a5e03f","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"3d67b4acbfc7af331d887a8efc04bef6573b8a7a","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"753c978f2400f9783eb524842a975d3ac950d511","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"2f7541afbc57fe9d26769a22c31d8ce8790c9a19","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"5e2d672280d97d83de43031d93761b12dadd7b8a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm1.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.1","versionType":"semver"},{"version":"5.10.273","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.111","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.50","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.4","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm1.c"]}],"references":["https://git.kernel.org/stable/c/b254cdadbcb6bdd0daf7391d63b3b97b2bec1ad9","https://git.kernel.org/stable/c/c96518231608bbf9568f539aadb20a8e366b54c7","https://git.kernel.org/stable/c/6564808189c9a1e682ee7b5e70f5f1c73c89c3a4","https://git.kernel.org/stable/c/81dfc6c665547a4e41721b6716f894f263a5e03f","https://git.kernel.org/stable/c/3d67b4acbfc7af331d887a8efc04bef6573b8a7a","https://git.kernel.org/stable/c/753c978f2400f9783eb524842a975d3ac950d511","https://git.kernel.org/stable/c/2f7541afbc57fe9d26769a22c31d8ce8790c9a19","https://git.kernel.org/stable/c/5e2d672280d97d83de43031d93761b12dadd7b8a"],"weaknesses":[],"ingestedAt":"2026-10-30T12:52:04.348Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/89xxx/CVE-2026-89763.json","commit":"1f312381e38164a43607eebab851b151dd16861e","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-89763","state":"PUBLISHED","datePublished":"2026-09-11T19:47:04.352Z","dateUpdated":"2026-10-30T12:33:00.263Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-11T19:38:34.764Z"},"containers":{"cna":{"title":"KEYS: trusted: Fix TPM teardown ordering","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nKEYS: trusted: Fix TPM teardown ordering\n\ntrusted_tpm_exit() drops the TPM chip reference and frees the digest\narray before unregistering the trusted key type. key_type_lookup()\nholds key_types_sem for reading until the key operation finishes, while\nunregister_key_type() takes it for writing. It therefore provides the\nsynchronization point that must precede backend teardown.\n\nThe current order permits this interleaving:\n\n  CPU 0                              CPU 1\n  trusted_tpm_exit()                 key_type_lookup(\"trusted\")\n    put_device(&chip->dev)             trusted_tpm_seal()\n    kfree(digests)                       pcrlock()\n    unregister_key_type()                  tpm_pcr_extend(..., digests)\n\nCPU 1 can consequently dereference the freed digest array. The chip can\nalso be released before callbacks stop using it.\n\nKASAN reported:\n\n  BUG: KASAN: slab-use-after-free in tpm_pcr_extend+0x1f0/0x200\n  Read of size 2 at addr ffff88810872d000 by task poc/89\n  Call Trace:\n    tpm_pcr_extend+0x1f0/0x200\n    pcrlock+0x42/0x70 [trusted]\n    trusted_tpm_seal+0x1b6/0x570 [trusted]\n    trusted_instantiate+0x293/0x340 [trusted]\n    __key_instantiate_and_link+0xb2/0x2b0\n    __key_create_or_update+0x61e/0xb50\n    __do_sys_add_key+0x1b8/0x310\n  Allocated by task 88:\n    __kmalloc_noprof+0x1a7/0x490\n    do_one_initcall+0xa1/0x390\n    do_init_module+0x2df/0x840\n  Freed by task 90:\n    kfree+0x131/0x3c0\n    trusted_tpm_exit+0x59/0xa0 [trusted]\n    __do_sys_delete_module+0x346/0x510\n\nMove unregister_key_type() before releasing either resource. This stops\nnew lookups and waits for in-flight key operations to finish before the\nbackend state is destroyed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"b254cdadbcb6bdd0daf7391d63b3b97b2bec1ad9","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"c96518231608bbf9568f539aadb20a8e366b54c7","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"6564808189c9a1e682ee7b5e70f5f1c73c89c3a4","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"81dfc6c665547a4e41721b6716f894f263a5e03f","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"3d67b4acbfc7af331d887a8efc04bef6573b8a7a","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"753c978f2400f9783eb524842a975d3ac950d511","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"2f7541afbc57fe9d26769a22c31d8ce8790c9a19","versionType":"git"},{"version":"0b6cf6b97b7ef1fa3c7fefab0cac897a1c4a3400","status":"affected","lessThan":"5e2d672280d97d83de43031d93761b12dadd7b8a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm1.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.1","versionType":"semver"},{"version":"5.10.273","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.111","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.50","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.4","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/keys/trusted-keys/trusted_tpm1.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b254cdadbcb6bdd0daf7391d63b3b97b2bec1ad9"},{"url":"https://git.kernel.org/stable/c/c96518231608bbf9568f539aadb20a8e366b54c7"},{"url":"https://git.kernel.org/stable/c/6564808189c9a1e682ee7b5e70f5f1c73c89c3a4"},{"url":"https://git.kernel.org/stable/c/81dfc6c665547a4e41721b6716f894f263a5e03f"},{"url":"https://git.kernel.org/stable/c/3d67b4acbfc7af331d887a8efc04bef6573b8a7a"},{"url":"https://git.kernel.org/stable/c/753c978f2400f9783eb524842a975d3ac950d511"},{"url":"https://git.kernel.org/stable/c/2f7541afbc57fe9d26769a22c31d8ce8790c9a19"},{"url":"https://git.kernel.org/stable/c/5e2d672280d97d83de43031d93761b12dadd7b8a"}],"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 UAF is reached only via the local add_key(2) syscall (trusted_instantiate → trusted_tpm_seal → pcrlock/tpm_* on global chip/digests) racing trusted_tpm_exit() during delete_module of trusted.ko; no network or adjacent protocol processes this key-type teardown.\nAC:L - The attacker controls both sides of the race by issuing concurrent add_key(\"trusted\") while trusted.ko is unloaded; key_type_lookup() still succeeds until unregister_key_type(), so the documented CPU0/CPU1 interleaving is reliably repeatable without uncontrollable victim memory layout.\nPR:L - add_key(2) on a caller-owned keyring has no capable() check in trusted_instantiate(); every seal/unseal uses the global chip after put_device, and only optional pcrlock() needs CAP_SYS_ADMIN. Per CNA driver-removal UAF precedent, concurrent rmmod of trusted.ko does not require the attacker to hold CAP_SYS_MODULE.\nUI:N - Exploitation is driven by the attacker's own add_key threads and module-unload timing; no separate victim must mount a filesystem, open a device, or take any other action.\nS:U - The vulnerability is a standard in-kernel slab use-after-free affecting host kernel memory and availability; it does not cross a VM, IOMMU, or other distinct security-authority boundary.\nC:H - KASAN shows a slab-use-after-free read of the freed digests array in tpm_pcr_extend, and put_device may free tpm_chip while callbacks still dereference it; per kernel CNA guidance a UAF enables object reuse and arbitrary kernel read, so Confidentiality is High.\nI:H - Seal/unseal after teardown calls tpm_try_get_ops() which mutates chip (get_device, mutex_lock) and PCR extend consumes the UAF'd digest buffer; use-after-free is heap-sprayable into write and control-flow primitives, so Integrity is High.\nA:H - The KASAN report is a kernel slab-use-after-free oops during add_key versus delete_module; any such UAF can panic or hang the kernel, scoring Availability High even when not fully exploited for code execution."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:33:00.263Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.10.273"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.15.224"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.12.111"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.18.50"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.2.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-89763","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T19:26:34.436196Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-16T19:36:59.769Z"}}]}}}