Linux kernel
cpe:2.3:a:linux:linux_kernel:*:*:*:*:*:*:*, +4 more
A soft deadlock vulnerability has been identified in the Linux kernel LoongArch architecture when the CONFIG_KASAN, CONFIG_PREEMPT_VOLUNTARY_BUILD, and CONFIG_PREEMPT_VOLUNTARY options are enabled simultaneously. This issue arises during the loading of certain kernel modules, particularly the amdgpu module, which is large and complex. The deadlock occurs because the module loading process, specifically the 'module_frob_arch_sections' function, becomes stalled while counting the Procedure Linkage Table (PLT) and Global Offset Table (GOT) entries needed for the module's relocations. This counting process can be inefficient, leading to a significant CPU time occupation and causing the soft deadlock.
The vulnerability causes a soft deadlock, where the system becomes unresponsive while still technically active, leading to a stalled kernel that fails to complete the module loading process. This can disrupt system operations and cause delays in processing tasks that depend on the affected modules.
The vulnerability can be reproduced by enabling the CONFIG_KASAN, CONFIG_PREEMPT_VOLUNTARY_BUILD, and CONFIG_PREEMPT_VOLUNTARY options in the Linux kernel configuration. Once these options are active, loading the amdgpu module will trigger the soft deadlock. This can be verified by observing the kernel logs, which will indicate a self-detected stall on the CPU, along with a call trace showing the functions involved in the deadlock scenario.
The vulnerability has been addressed in a patch that optimizes the module loading process by improving how the PLT and GOT entries are counted. This patch reduces the counting algorithm's complexity from O(n^2) to O(n log n), significantly speeding up the module loading time for large modules. The patched version can be obtained from the Linux kernel stable tree.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.