CVE-2025-38040
Linux Kernel vulnerability analysis and mitigation

Overview

A vulnerability (CVE-2025-38040) was discovered in the Linux kernel's serial mctrl_gpio driver, specifically affecting the SAMA5D27 platform using atmel_serial. The issue was identified and disclosed on June 18, 2025, where a sleeping function was called from an invalid context at kernel/irq/manage.c:738 (Wiz Database).

Technical details

The vulnerability occurs when disable_irq is called in mctrl_gpio_disable_ms while in an atomic context. The issue manifests when tty drivers perform modem lines configuration in regions protected by port lock. The bug is triggered specifically in the context of serial port operations, with preempt_count showing 1 when it was expected to be 0, and hardirqs being disabled. The warning is emitted when trying to toggle flow control using serdev_device_set_flow_control in a device driver (Debian Tracker, Wiz Database).

Impact

The vulnerability affects the Linux kernel's serial port handling, specifically the mctrl_gpio driver. When triggered, it can cause system instability due to improper interrupt handling and potential deadlock situations in the kernel's serial subsystem (Wiz Database).

Mitigation and workarounds

The vulnerability has been resolved by splitting the mctrl_gpio_disable_ms function into two different APIs: a non-blocking version and a blocking version. The fix involves replacing mctrl_gpio_disable_ms calls with the appropriate version depending on whether the call is protected by port lock (Debian Tracker).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-71142N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-core
NoNoJan 14, 2026
CVE-2025-71137N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k
NoYesJan 14, 2026
CVE-2025-71135N/AN/A
  • Linux KernelLinux Kernel
  • rv
NoNoJan 14, 2026
CVE-2025-71134N/AN/A
  • Linux KernelLinux Kernel
  • kernel-zfcpdump
NoNoJan 14, 2026
CVE-2025-71133N/AN/A
  • Linux KernelLinux Kernel
  • kernel-rt-debug
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management