diff options
| author | Yuqi Xu <xuyuqiabc@gmail.com> | 2026-09-28 16:27:00 +0800 |
|---|---|---|
| committer | Jarkko Sakkinen <jarkko@kernel.org> | 2026-10-23 00:59:21 +0300 |
| commit | 071aa806f00cf2948ce8082102d5f64515f53215 (patch) | |
| tree | 537de1e53054c2de368d37722fa8f65f42c056d9 /tools/perf/scripts/python/bin | |
| parent | 03f05257358dabb673ed21c64b0217442a55bfe2 (diff) | |
| download | linux-071aa806f00cf2948ce8082102d5f64515f53215.tar.gz linux-071aa806f00cf2948ce8082102d5f64515f53215.zip | |
tpm: reject duplicate PCR banks in tpm2_get_pcr_allocation
The TPM2_CAP_PCRS response is external input. tpm2_get_pcr_allocation()
adds every active selection to allocated_banks, while
tpm_sysfs_add_device() has one group slot per distinct hash algorithm.
Eight duplicate selections can therefore write past chip->groups[].
The TPM protocol does not allow a hash algorithm to appear twice in
this capability response. Treat a duplicate as a broken TPM and return
-EIO so the chip is not enabled, instead of silently dropping the
extra selection.
Assisted-by: LLM
Signed-off-by: Yuqi Xu <xuyuqiabc@gmail.com>
Reviewed-by: Ren Wei <weir@nebusec.ai>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lore.kernel.org/r/9d27c4513a3c6fc32f9574ba192cd3bfcb2bac98.1790568982.git.xuyuqiabc@gmail.com
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
