Introducing Wiz for Exposure Management: Unify, prioritize, and remediate exposures everywhere.

CVE-2024-56673
Linux Kernel vulnerability analysis and mitigation

Overview

In the Linux kernel, a vulnerability (CVE-2024-56673) was discovered in the RISC-V memory management subsystem. The issue affects the vmemmap page table teardown process when using RV64 with SPARSEMEM_VMEMMAP. The vulnerability was disclosed on December 27, 2024, and affects Linux kernel versions from 6.11 up to (excluding) 6.12.6, as well as versions 6.13-rc1 and 6.13-rc2 (NVD).

Technical details

The vulnerability stems from incorrect handling of page middle directory (PMD) destructors during vmemmap page table teardown. The vmemmap's page tables are populated using PMD hugetables, but the PMD allocation doesn't use the generic VMA code mechanism or RISC-V specific mapping functions. Instead, it directly allocates a page and calls vmemmapsetpmd(). This results in the PMD constructor not being called. However, during teardown, the code incorrectly calls the PMD destructor unconditionally, leading to a system crash (Kernel Patch).

Impact

When exploited, this vulnerability can result in a kernel panic and system crash. This was particularly observed when running HMM (Heterogeneous Memory Management) selftests, specifically when unloading the testhmm.ko module. The issue manifests as a kernel BUG with VMBUGONPAGE assertions, leading to fatal exceptions in interrupt handling (NVD).

Mitigation and workarounds

The vulnerability has been patched by adding a check to avoid calling the PMD destructor if the calling context is vmemmap_free(). Users are advised to upgrade to Linux kernel version 6.12.6 or later, which contains the fix. The patch has been backported to affected stable kernel versions (Kernel Patch).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management