KEYS: trusted: Fix memory leak in tpm2_key_encode() (Linux Linux)

CVE-2024-36967
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.21 % · percentile 12 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Modified

Description

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.

Weaknesses (CWE)

  • CWE-401 — Missing Release of Memory after Effective Lifetime

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected f2219745250f388edacabe6cca73654131c67d0a < 1e6914fa8e7798bcf3ce4a5b96ea4ac1d5571cdf ; affected f2219745250f388edacabe6cca73654131c67d0a < 5d91238b590bd883c86ba7707c5c9096469c08b7 ; affected f2219745250f388edacabe6cca73654131c67d0a < e62835264d0352be6086975f18fdfed2b5520b13 ; affected f2219745250f388edacabe6cca73654131c67d0a < 189c768932d435045b1fae12bf63e53866f06a28 ; affected f2219745250f388edacabe6cca73654131c67d0a < cf26a92f560eed5d6ddc3d441cc645950cbabc56 ; affected f2219745250f388edacabe6cca73654131c67d0a < ffcaa2172cc1a85ddb8b783de96d38ca8855e248
Linux · Linuxaffected 5.13 ; unaffected 0 < 5.13 ; unaffected 5.15.160 ≤ 5.15.* ; unaffected 6.1.92 ≤ 6.1.* ; unaffected 6.6.32 ≤ 6.6.* ; unaffected 6.8.11 ≤ 6.8.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD