Executive brief
A vulnerability was identified in the Linux kernel's IOMMU component, which manages how hardware devices interact with system memory. Under specific configurations, certain device drivers could experience a system crash (NULL pointer dereference) when attempting to bind process address spaces. While the practical risk is low due to existing configuration checks, a successful exploit could lead to a denial-of-service by crashing the operating system.
Technical details
A vulnerability exists in the Linux kernel's IOMMU Shared Virtual Addressing (SVA) implementation. The function iommu_sva_bind_device() was designed to return either a valid handle or an ERR_PTR on failure; however, when CONFIG_IOMMU_SVA was disabled, it incorrectly returned NULL. Drivers such as idxd and uacce use the IS_ERR() macro to validate the return value, which does not catch NULL, leading to a potential NULL pointer dereference. The risk is mitigated in practice because iommu_dev_enable_feature() typically fails before this function is called in such configurations. The fix involves changing the return value to ERR_PTR(-ENODEV) to ensure proper error handling by calling drivers.
Affected products
- Linux Linux Kernel 5.2 to 5.4.279, 5.5 to 5.10.221, 5.11 to 5.15.162, 5.16 to 6.6.35, 6.7 to 6.9.6
Timeline
- 2024-07-12: disclosed: CVE published
- 2024-05-28: patched: Initial patch submitted by Lu Baolu
References
- https://git.kernel.org/stable/c/2973b8e7d127754de9013177c41c0b5547406998
- https://git.kernel.org/stable/c/61a96da9649a6b6a1a5d5bde9374b045fdb5c12e
- https://git.kernel.org/stable/c/6325eab6c108fed27f60ff51852e3eac0ba23f3f
- https://git.kernel.org/stable/c/700f564758882db7c039dfba9443fe762561a3f8
- https://git.kernel.org/stable/c/7388ae6f26c0ba95f70cc96bf9c5d5cb06c908b6
- https://git.kernel.org/stable/c/89e8a2366e3bce584b6c01549d5019c5cda1205e
- https://git.kernel.org/stable/c/cf34f8f66982a36e5cba0d05781b21ec9606b91e