summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorGunnar Kudrjavets <gunnarku@amazon.com>2026-04-15 03:00:03 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2026-04-21 18:54:28 +0300
commitf0f75a3d98b7959a8677b6363e23190f3018636b (patch)
tree5e890d0ad47f033763d66ca2395804afee233679 /include/trace
parent666c1a2ca603d8314231200bf8bbb3a81bd64c6b (diff)
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. Cc: stable@vger.kernel.org # v6.19+ Fixes: bda1cbf73c6e ("tpm2-sessions: Fix tpm2_read_public range checks") Signed-off-by: Gunnar Kudrjavets <gunnarku@amazon.com> Reviewed-by: Justinien Bouron <jbouron@amazon.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions