CVE-2024-57889
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-57889 affects the Linux kernel's pinctrl-mcp23s08 driver, specifically related to a sleeping in atomic context issue due to regmap locking. The vulnerability was discovered when using MCP23xxx IO expander for IRQs, and was disclosed on January 15, 2025. The issue affects Linux kernel systems using the MCP23xxx IO expander devices, particularly in configurations where the device is used to receive IRQs (NVD).

Technical details

The vulnerability occurs when the pinctrl-mcp23s08 driver attempts to lock a mutex while holding a spinlock, which is not allowed in the Linux kernel. Specifically, mcp23s08irqsettype() calls regmapupdatebitsbase(), which attempts to lock a mutex, while _setupirq() has already locked desc->lock spinlock. The regmap in the driver uses a mutex for protection from concurrent accesses by default, but this creates a conflict when combined with spinlock operations (Kernel Commit).

Impact

When triggered, the vulnerability causes a system bug that manifests as a 'sleeping function called from invalid context' error. This occurs in atomic context at kernel/locking/mutex.c:283, with irqsdisabled and incorrect preemptcount values, potentially leading to system instability or crashes (Kernel Commit).

Mitigation and workarounds

The issue has been fixed by adding proper locking in mcppinconfget/set() and disabling internal locking in the regmap config. The fix involves adding mutexlock/unlock operations around critical sections and setting .disablelocking = true in the regmap configuration. The patch has been included in various Linux kernel versions, including 5.10.234-1 and 6.1.128-1~deb11u1 for Debian systems (Debian LTS).

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-40205HIGH7.8
  • Linux KernelLinux Kernel
  • linux-gcp-5.4
NoYesNov 12, 2025
CVE-2025-40211HIGH7.1
  • Linux KernelLinux Kernel
  • linux-gcp-6.8
NoYesNov 21, 2025
CVE-2025-40206MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-modules-extra
NoYesNov 12, 2025
CVE-2025-40210MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-rt-64k-modules
NoYesNov 21, 2025
CVE-2025-40212N/AN/A
  • Linux KernelLinux Kernel
  • linux-azure-6.14
NoYesNov 24, 2025

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