Linux kernel
cpe:2.3:a:linux:linux_kernel:*:*:*:*:*:*:*, +4 more
A vulnerability exists in the Linux kernel on LoongArch architecture, where a sleeping function is called in a context that does not allow it, under certain debug configurations. This issue arises in the 'constant_clockevent_init' function, which improperly calls 'get_timer_irq()' multiple times. The misuse of 'might_sleep()' in a preemption-disabled context triggers a warning, indicating that the function could potentially sleep when it shouldn't, disrupting the expected execution flow.
The vulnerability can lead to improper handling of sleep functions, potentially causing deadlocks or other synchronization issues in the kernel.
The vulnerability can be reproduced by booting a LoongArch system with the 'CONFIG_DEBUG_ATOMIC_SLEEP' and 'CONFIG_DEBUG_PREEMPT' options enabled. This configuration will cause the kernel to issue warnings about sleeping functions being called from invalid contexts, particularly during the initialization of secondary CPUs.
The vulnerability has been addressed in the Linux kernel by modifying the 'constant_clockevent_init' function to only call 'get_timer_irq()' once, using a check to ensure the timer IRQ has not already been retrieved.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.