tpm2-sessions: Fix missing tpm_buf_destroy() in tpm2_read_public()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tpm2-sessions: Fix missing tpm_buf_destroy() in tpm2_read_public()
tpm2_read_public() calls tpm_buf_init() but fails to call tpm_buf_destroy() on two exit paths, leaking a page allocation:
1. When name_size() returns an error (unrecognized hash algorithm), the function returns directly without destroying the buffer.
2. On the success path, the buffer is never destroyed before returning.
All other error paths in the function correctly call tpm_buf_destroy() before returning.
Fix both by adding the missing tpm_buf_destroy() calls.
From the CVE record · Linux
The Linux kernel’s tpm2_read_public() fails to free a page allocation on its success path and when name_size() returns an error. This can leak memory; the input does not specify how an attacker could trigger it or whether access or user interaction is required.
Operators running the Linux kernel should check their installations; affected versions are not specified.