CVE-2025-38040
BaseFortify
Publication date: 2025-06-18
Last updated on: 2025-12-18
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | to 6.1.141 (exc) |
| linux | linux_kernel | From 6.2 (inc) to 6.6.93 (exc) |
| linux | linux_kernel | From 6.7 (inc) to 6.12.31 (exc) |
| linux | linux_kernel | From 6.13 (inc) to 6.14.9 (exc) |
| debian | debian_linux | 11.0 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-NVD-CWE-noinfo |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability involves the Linux kernel's serial driver (specifically mctrl_gpio) where a function called disable_ms was originally implemented as a single API that could be called in contexts where sleeping is not allowed (atomic context). This caused a kernel warning because disable_irq was called in an invalid context, potentially leading to system instability or crashes. The fix was to split disable_ms into two separate APIs: one that is non-blocking (safe for atomic context) and one that is blocking (for non-atomic context), ensuring the correct API is used depending on the context.
How can this vulnerability impact me? :
This vulnerability can cause kernel warnings and potentially system instability or crashes when certain serial device drivers attempt to toggle flow control in an invalid context. This could affect the reliability of devices using the affected serial drivers, possibly leading to unexpected behavior or system faults on platforms like SAMA5D27.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring kernel logs for the specific BUG warning related to 'sleeping function called from invalid context' in the atmel_serial driver, especially messages mentioning disable_irq called in atomic context. You can check the kernel log using the command: dmesg | grep 'sleeping function called from invalid context' or dmesg | grep 'mctrl_gpio_disable_ms'. Additionally, monitoring for kernel BUG messages related to serial or tty drivers may help identify the issue.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves updating the Linux kernel to a version where the mctrl_gpio_disable_ms function has been split into synchronous and non-synchronous APIs, ensuring that calls to disable IRQs in atomic contexts are replaced with the appropriate non-blocking API. If updating is not immediately possible, avoid toggling flow control in atomic contexts or regions protected by port locks to prevent the BUG from occurring.