| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2024-36967: KEYS: trusted: Fix memory leak in tpm2_key_encode() |
| |
| 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. |
| |
| The Linux kernel CVE team has assigned CVE-2024-36967 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.13 with commit f2219745250f388edacabe6cca73654131c67d0a and fixed in 5.15.160 with commit 1e6914fa8e7798bcf3ce4a5b96ea4ac1d5571cdf |
| Issue introduced in 5.13 with commit f2219745250f388edacabe6cca73654131c67d0a and fixed in 6.1.92 with commit 5d91238b590bd883c86ba7707c5c9096469c08b7 |
| Issue introduced in 5.13 with commit f2219745250f388edacabe6cca73654131c67d0a and fixed in 6.6.32 with commit e62835264d0352be6086975f18fdfed2b5520b13 |
| Issue introduced in 5.13 with commit f2219745250f388edacabe6cca73654131c67d0a and fixed in 6.8.11 with commit 189c768932d435045b1fae12bf63e53866f06a28 |
| Issue introduced in 5.13 with commit f2219745250f388edacabe6cca73654131c67d0a and fixed in 6.9.2 with commit cf26a92f560eed5d6ddc3d441cc645950cbabc56 |
| Issue introduced in 5.13 with commit f2219745250f388edacabe6cca73654131c67d0a and fixed in 6.10 with commit ffcaa2172cc1a85ddb8b783de96d38ca8855e248 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2024-36967 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| security/keys/trusted-keys/trusted_tpm2.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| 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 |