Skip to main content

CVE-2024-36477: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-36477cvecve-2024-36477
Published: Fri Jun 21 2024 (06/21/2024, 11:18:46 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In 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.

AI-Powered Analysis

AILast updated: 06/29/2025, 09:40:18 UTC

Technical Analysis

CVE-2024-36477 is a vulnerability identified in the Linux kernel's TPM (Trusted Platform Module) SPI (Serial Peripheral Interface) transfer mechanism. The issue arises because the TPM SPI transfer code uses a constant MAX_SPI_FRAMESIZE to calculate the maximum transfer length and allocate the transfer buffer size. However, it fails to account for an additional 4-byte SPI header that precedes the SPI data frame. This oversight leads to out-of-bounds memory accesses during SPI transfers, as confirmed by Kernel Address Sanitizer (KASAN) testing. The root cause is that the buffer allocation does not include space for the SPI header, potentially causing memory corruption or crashes when the SPI transfer exceeds the allocated buffer size. The fix involves introducing a new constant SPI_HDRSIZE to represent the 4-byte header size and adjusting the buffer allocation logic to include this header size, thereby preventing out-of-bounds access. This vulnerability affects the Linux kernel versions identified by the commit hash a86a42ac2bd652fdc7836a9d880c306a2485c142 and likely other versions containing the same TPM SPI transfer code. No known exploits are reported in the wild at this time, and no CVSS score has been assigned yet. The vulnerability is technical and low-level, impacting the kernel's TPM SPI driver, which is critical for secure hardware-based cryptographic operations and platform integrity verification.

Potential Impact

For European organizations, the impact of CVE-2024-36477 depends on their use of Linux systems with TPM hardware accessed via SPI interfaces. TPM modules are widely used in enterprise environments for secure boot, disk encryption, and hardware-based key storage. Exploitation of this vulnerability could lead to kernel memory corruption, potentially causing system instability, crashes, or denial of service. In worst-case scenarios, it might be leveraged to bypass TPM protections or escalate privileges if combined with other vulnerabilities, undermining the security guarantees TPM provides. Organizations relying on Linux servers, embedded devices, or industrial control systems with TPM SPI interfaces are at risk. The vulnerability could disrupt critical infrastructure, especially in sectors like finance, healthcare, and government, where TPM is used for securing sensitive data and ensuring platform trustworthiness. Although no active exploits are known, the presence of out-of-bounds access vulnerabilities in kernel code is a serious concern, warranting prompt patching to maintain system integrity and availability.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel to the patched version that includes the fix for CVE-2024-36477. Since this vulnerability is in the kernel TPM SPI driver, kernel upgrades from trusted Linux distributions that have incorporated the fix are the most effective mitigation. Organizations should: 1) Identify all systems using TPM SPI interfaces, especially those running custom or embedded Linux kernels. 2) Apply vendor-supplied kernel updates or backport patches that introduce SPI_HDRSIZE and correct buffer allocation. 3) Conduct thorough testing in staging environments to ensure stability post-patch. 4) Monitor kernel logs and system behavior for anomalies related to TPM SPI transfers. 5) Limit physical and network access to critical systems to reduce the risk of exploitation attempts. 6) Employ kernel hardening techniques such as Kernel Address Sanitizer (KASAN) in development and testing environments to detect similar memory issues proactively. 7) Maintain an inventory of TPM hardware and firmware versions to assess exposure and compatibility with patches. These steps go beyond generic advice by focusing on TPM SPI interface identification, kernel patch management, and proactive memory corruption detection.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-06-21T11:16:40.603Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9828c4522896dcbe254c

Added to database: 5/21/2025, 9:08:56 AM

Last enriched: 6/29/2025, 9:40:18 AM

Last updated: 7/30/2025, 8:16:53 AM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats