# CVE-2024-36967: KEYS: trusted: Fix memory leak in tpm2\_key\_encode()

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-06-08 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2024-36967, DEBIAN-CVE-2024-36967
- Record: https://cvemate.com/vulnerability/CVE-2024-36967 · JSON: https://cvemate.com/vulnerability/CVE-2024-36967/json

## Description

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

KEYS: trusted: Fix memory leak in tpm2_key_encode()

'scratch' is never freed. Fix this by calling kfree() in the success, and
in the error case.
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.212%, percentile 12.21%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 120)

- debian linux (Debian): \< 6.1.94-1 \| \< 6.8.11-1
- ubuntu linux (Ubuntu): \< 5.15.0-118.128 \| \< 6.8.0-40.40
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 5.15.0-1067.73 \| \< 6.8.0-1013.14
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1067.73~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1013.14~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1067.73+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1070.79 \| \< 6.8.0-1012.14
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): \< 5.15.0-1070.79~20.04.1
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 23)

- <https://git.kernel.org/stable/c/1e6914fa8e7798bcf3ce4a5b96ea4ac1d5571cdf>
- <https://git.kernel.org/stable/c/5d91238b590bd883c86ba7707c5c9096469c08b7>
- <https://git.kernel.org/stable/c/e62835264d0352be6086975f18fdfed2b5520b13>
- <https://git.kernel.org/stable/c/189c768932d435045b1fae12bf63e53866f06a28>
- <https://git.kernel.org/stable/c/cf26a92f560eed5d6ddc3d441cc645950cbabc56>
- <https://git.kernel.org/stable/c/ffcaa2172cc1a85ddb8b783de96d38ca8855e248>
- <https://ubuntu.com/security/CVE-2024-36967>
- <https://www.cve.org/CVERecord?id=CVE-2024-36967>
- <https://git.kernel.org/linus/ffcaa2172cc1a85ddb8b783de96d38ca8855e248>
- <https://ubuntu.com/security/notices/USN-6949-1>
- <https://ubuntu.com/security/notices/USN-6950-1>
- <https://ubuntu.com/security/notices/USN-6952-1>
- <https://ubuntu.com/security/notices/USN-6955-1>
- <https://ubuntu.com/security/notices/USN-6956-1>
- <https://ubuntu.com/security/notices/USN-6957-1>
- <https://ubuntu.com/security/notices/USN-6950-2>
- <https://ubuntu.com/security/notices/USN-6950-3>
- <https://ubuntu.com/security/notices/USN-6949-2>
- <https://ubuntu.com/security/notices/USN-6952-2>
- <https://ubuntu.com/security/notices/USN-6950-4>

---

Data as of 2026-12-05T04:23:18.507Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
