summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorJiangshan Yi <yijiangshan@kylinos.cn>2026-09-01 17:30:49 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2026-09-01 17:30:49 +0300
commited89dd98a21da7c1fd02b1d755aaead93d323a68 (patch)
tree3af9e96cf1ef6f4cff45b83670a58bd887191c88 /scripts/Makefile.thinlto
parentbf0d7882cd43d6b155d93e482893f685d6f08b89 (diff)
downloadlinux-next-ed89dd98a21da7c1fd02b1d755aaead93d323a68.tar.gz
linux-next-ed89dd98a21da7c1fd02b1d755aaead93d323a68.zip
tpm: Fix heap buffer overflow in tpm_transmit_cmd()
struct tpm_buf now uses an embedded flexible array for data, which is 6 bytes shorter than TPM_BUFSIZE due to the struct header. But tpm_transmit_cmd() still passes PAGE_SIZE to tpm_transmit(), and after clamping to TPM_BUFSIZE in tpm_try_transmit(), chip->ops->recv() can write past the end of data[] by 6 bytes. Pass buf->capacity to tpm_transmit() instead. Fixes: 3d9e043dab0a ("tpm-buf: Memory-safe allocations") Cc: stable@vger.kernel.org Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn> Link: https://lore.kernel.org/r/20260901062850.379870-1-yijiangshan@kylinos.cn Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions