tpm_tis_spi: Account for SPI header when allocating TPM SPI xfer buffer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.6.336.9.46.10In the Linux kernel, the following vulnerability has been resolved:
tpm_tis_spi: Account for SPI header when allocating TPM SPI xfer buffer
The TPM SPI transfer mechanism uses MAX_SPI_FRAMESIZE for computing the maximum transfer length and the size of the transfer buffer. As such, it does not account for the 4 bytes of header that prepends the SPI data frame. This can result in out-of-bounds accesses and was confirmed with KASAN.
Introduce SPI_HDRSIZE to account for the header and use to allocate the transfer buffer.
From the CVE record · Linux
The Linux kernel’s TPM SPI transfer buffer does not account for the four-byte SPI header. This can cause out-of-bounds accesses during TPM SPI transfers; the input does not establish how an attacker could trigger them or whether authentication or user interaction is required.
Engineers running Linux kernels that use the tpm_tis_spi TPM driver should check their versions against the vendor advisory; affected versions are not specified.