Linux · Linux Kernel · CVE-2024-57939
**Name of the Vulnerable Software and Affected Versions**
Linux kernel versions prior to 6.6.74
**Description**
The issue is related to the Linux kernel, specifically with the riscv architecture. The problem arises when the `die()` function is called in an exception handler, which cannot sleep. However, `die()` uses `spinlock t`, which can sleep when `PREEMPT RT` is enabled, causing a warning. The warning indicates a sleeping function called from an invalid context. The solution involves switching to use `raw spinlock t`, which does not sleep even with `PREEMPT RT` enabled.
**Recommendations**
To resolve the issue, update to Linux kernel version 6.6.74 or later. As a temporary workaround, consider disabling the `PREEMPT RT` feature until a patch is available. Restrict access to the vulnerable `die()` function to minimize the risk of exploitation. Avoid using the `spinlock t` variable in the affected API endpoint until the issue is resolved.