Executive brief
A vulnerability in the Linux kernel's LoongArch architecture support could cause a system crash (kernel panic) when certain discrete graphics cards are used. This occurs because the system incorrectly attempts to access memory addresses that do not exist or are not properly mapped during hardware initialization. While this primarily affects system stability and availability, it could be used to disrupt operations on affected Loongson-based hardware.
Technical details
A vulnerability exists in the LoongArch PCI implementation within the 'loongson_gpu_fixup_dma_hang' function. The root cause is a missing default case in a switch statement that determines register offsets based on PCI device IDs. When a discrete GPU or an unexpected device is present, the function may attempt to perform a 'readl()' operation using an uninitialized or 'random' address derived from 'pdev->devfn'. This results in an Address Error (ADE) exception and a subsequent kernel panic during device discovery or setup. The fix involves adding a default switch case to properly unmap the region and exit if the device ID is not recognized. This is reachable via local hardware configuration or during the PCI bus scanning process.
Affected products
- Linux Linux Kernel LoongArch architecture
Timeline
- 2026-05-04: patched: Initial patch submitted by Wentao Guan
- 2026-05-28: disclosed: CVE-2026-46156 published
References
- https://git.kernel.org/stable/c/07d190e4ec689d6478f7f5e36099fb9bf457e7c5
- https://git.kernel.org/stable/c/2cb19b06c09983727573bbe7d7430cbad480a714
- https://git.kernel.org/stable/c/81fef1c278436e6bd68ee4ca05a0acb96e256561
- https://git.kernel.org/stable/c/8dfa2f8780e486d05b9a0ffce70b8f5fbd62053e
- https://git.kernel.org/stable/c/9e1aed63a5552958ef2a9bfd699a3f990e52a77f