CVE-2024-40945
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-40945 affects the Linux kernel's IOMMU subsystem, specifically the iommusvabind_device() function. The vulnerability was discovered in July 2024 and affects Linux kernel versions from 5.2 through 6.9.6. The issue involves a potential NULL pointer dereference vulnerability in the IOMMU subsystem (NVD).

Technical details

The vulnerability exists in the iommusvabinddevice() function, which should return either an SVA bond handle or an ERRPTR value in error cases. The function was returning NULL instead of an error pointer, which could lead to a kernel NULL pointer dereference when existing drivers (idxd and uacce) only check the return value with IS_ERR(). The vulnerability has been assigned a CVSS v3.1 base score of 5.5 (Medium) with vector AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (NVD).

Impact

While the vulnerability could potentially lead to a kernel NULL pointer dereference, in practice it doesn't cause problems because iommusvabinddevice() only returns NULL when the kernel is not configured with CONFIGIOMMUSVA. In such cases, iommudevenablefeature(dev, IOMMUDEVFEATSVA) returns an error, preventing device drivers from calling iommusvabinddevice() (Kernel Patch).

Mitigation and workarounds

The issue has been fixed in multiple Linux kernel versions through patches that modify the iommusvabinddevice() function to return ERRPTR(-ENODEV) instead of NULL. The fix has been backported to various stable kernel branches including 5.4, 5.10, 5.15, and 6.1 (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