Junglewise Threat Intelligence

CVE-2024-58005: Linux Kernel denial of service in TPM ACPI event log allocation

CVE-2024-58005 · Severity: medium · CVSS 5.5 · Published 2025-02-27

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's Trusted Platform Module (TPM) component could cause a system crash or instability. The issue occurs when the system attempts to allocate a large memory buffer for security logs provided by the computer's firmware (ACPI). If an attacker or a malfunctioning firmware provides an unexpectedly large log size, it can trigger a kernel warning or failure, potentially leading to a denial of service.

Technical details

A vulnerability exists in the TPM event log handling within the Linux kernel's ACPI implementation (`drivers/char/tpm/eventlog/acpi.c`). The issue stems from the use of `devm_kmalloc()`, which relies on `kmalloc()` and can fail or trigger kernel warnings when attempting to allocate large contiguous memory blocks (e.g., 16 MiB as reported on certain HPE hardware). An attacker with local access or a compromised ACPI table could specify a large log buffer size, causing an allocation failure in `__alloc_pages_noprof()`. The fix replaces `devm_kmalloc()` with `kvmalloc()`, which allows for non-contiguous (virtually contiguous) memory allocations, and implements manual cleanup via `devm_add_action()`.

Affected products

  • Linux Linux Kernel 2.6.16 to 6.6.78, 6.7 to 6.12.14, 6.13 to 6.13.3

Timeline

  • 2024-12-27: patched: Initial patch authored by Jarkko Sakkinen
  • 2025-02-27: advisory: CVE-2024-58005 published

References

Related threats