# CVE-2021-47009: KEYS: trusted: Fix memory leak on object td

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-02-28T08:13:28.439Z
- Modified: 2026-06-17T04:16:10.187Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

KEYS: trusted: Fix memory leak on object td

Two error return paths are neglecting to free allocated object td,
causing a memory leak. Fix this by returning via the error return
path that securely kfree's td.

Fixes clang scan-build warning:
security/keys/trusted-keys/trusted_tpm1.c:496:10: warning: Potential
memory leak [unix.Malloc]

(As written by CVE List.)

## Affected

- Linux Linux: from 9d83cc1a1e7f494aedee2aa108e801d11525fccf before 31c9a4b24d86cbb36ff0d7a085725a3b4f0138c8; from 8cfc8d62942105e5df4a20a15b24da077a6b24ef before 1c4031014106aff48e1e686e40101c31eab5d44c; from 5df16caada3fba3b21cb09b85cdedf99507f4ec1 before 3e24fbd37e72e8a67b74991970fecc82d14f57af; from 5df16caada3fba3b21cb09b85cdedf99507f4ec1 before 83a775d5f9bfda95b1c295f95a3a041a40c7f321; from 5.10.20 before 5.10.38; from 5.11.3 before 5.11.22; 5.12 (not affected: before 5.12; from 5.10.38 up to 5.10.*; from 5.11.22 up to 5.11.*; from 5.12.5 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.10.20 before 5.10.38; from 5.11.3 before 5.11.22; from 5.12 before 5.12.5; 5.12

## References

- <https://git.kernel.org/stable/c/31c9a4b24d86cbb36ff0d7a085725a3b4f0138c8> (patch)
- <https://git.kernel.org/stable/c/1c4031014106aff48e1e686e40101c31eab5d44c> (patch)
- <https://git.kernel.org/stable/c/3e24fbd37e72e8a67b74991970fecc82d14f57af> (patch)
- <https://git.kernel.org/stable/c/83a775d5f9bfda95b1c295f95a3a041a40c7f321> (patch)

## Sources

- CVE List: [CVE-2021-47009](https://www.cve.org/CVERecord?id=CVE-2021-47009), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2021-47009](https://nvd.nist.gov/vuln/detail/CVE-2021-47009), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47009 · Whole record: https://cve.day/CVE-2021-47009.json · Rebuilt by cve.day 2026-11-25T22:58:08.614Z
