Fix a couple of issues in TPM related code
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest10 patches 3 repliesIn review
- v210 patches 0 repliesSuperseded
- v110 patches 14 repliesSuperseded
Changes in v3 from the cover letter
- 6/10: Remove call to clearing of buffers
Patches in v3 No applies recorded yet
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by.
| Patch | Marc-André Lureau | Arun Menon |
|---|---|---|
| 1/10 | R-b | |
| 2/10 | R-b | |
| 3/10 | R-b | |
| 4/10 | R-b | |
| 5/10 | R-b | |
| 6/10 | R-b | R-b |
| 7/10 | R-b | |
| 8/10 | R-b | |
| 9/10 | R-b | |
| 10/10 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/10] Fix a couple of issues in TPM related code
This series of patches fixes various issues in TPM-related code, such as memory leaks, potential integer underflows, clearing of buffers while they are in use, and the proper handling of sizes of commands or responses.
Regards,
Stefan
v3:
- 6/10: Remove call to clearing of buffers
v2:
- Address issues pointed out by Marc-André
Stefan Berger (10):
tpm_util: Pass TPMVersion to function writing fatal error response
tpm_emulator: Reject TPM responses whose size is too small
tpm_emulator: Reject sending commands smaller than the request header hw/tpm: tis: Only read from response buffer if rw_offset < len hw/tpm: tis: Use uint32_t for len to avoid truncating size of command hw/tpm: crb: Do not clear internal buffers when backend is busy hw/tpm: crb: Avoid potential integer underflow
hw/tpm: crb: Implement tpm_ppi_uninit and use it in tpm_crb_unrealize hw/tpm: crb: Consider response_buffer->len of received response
tests: Add tests with commands with bad length
backends/tpm/tpm_emulator.c | 12 ++++-- backends/tpm/tpm_passthrough.c | 2 +- backends/tpm/tpm_util.c | 17 ++++++-- hw/tpm/tpm_crb.c | 21 +++++++--- hw/tpm/tpm_ppi.c | 10 +++++ hw/tpm/tpm_ppi.h | 10 +++++ hw/tpm/tpm_tis_common.c | 8 ++-- include/system/tpm_util.h | 3 +- tests/qtest/tpm-crb-swtpm-test.c | 10 +++++ tests/qtest/tpm-tests.c | 56 +++++++++++++++++++++++++ tests/qtest/tpm-tests.h | 8 ++++ tests/qtest/tpm-tis-device-swtpm-test.c | 10 +++++ tests/qtest/tpm-tis-swtpm-test.c | 10 +++++ tests/qtest/tpm-util.c | 55 ++++++++++++++++++++++++ tests/qtest/tpm-util.h | 3 ++ 15 files changed, 219 insertions(+), 16 deletions(-)
Signature · 1 line
2.55.0