mirror of
https://github.com/torvalds/linux.git
synced 2026-10-16 04:39:02 +02:00
check_locality() treats every nonzero transport return as success. SPI
errors remain negative, while the I2C path can convert a negative write
error through its byte-sized status variable. Either result is nonzero
even though the TPM_ACCESS byte can remain unwritten, so indeterminate
ACTIVE_LOCALITY and VALID bits can falsely report an active locality.
Require recv() to return exactly the requested byte before examining
TPM_ACCESS. Transport errors and short reads now report an inactive
locality, while successful reads retain the existing behavior.
This issue was found by a static analysis checker and confirmed by manual
source review.
Fixes:
|
||
|---|---|---|
| .. | ||
| i2c.c | ||
| Kconfig | ||
| Makefile | ||
| spi.c | ||
| st33zp24.c | ||
| st33zp24.h | ||