CVE-2025-38632
Severity CVSS v4.0:
Pending analysis
Type:
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
22/08/2025
Last modified:
26/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
pinmux: fix race causing mux_owner NULL with active mux_usecount<br />
<br />
commit 5a3e85c3c397 ("pinmux: Use sequential access to access<br />
desc->pinmux data") tried to address the issue when two client of the<br />
same gpio calls pinctrl_select_state() for the same functionality, was<br />
resulting in NULL pointer issue while accessing desc->mux_owner.<br />
However, issue was not completely fixed due to the way it was handled<br />
and it can still result in the same NULL pointer.<br />
<br />
The issue occurs due to the following interleaving:<br />
<br />
cpu0 (process A) cpu1 (process B)<br />
<br />
pin_request() { pin_free() {<br />
<br />
mutex_lock()<br />
desc->mux_usecount--; //becomes 0<br />
..<br />
mutex_unlock()<br />
<br />
mutex_lock(desc->mux)<br />
desc->mux_usecount++; // becomes 1<br />
desc->mux_owner = owner;<br />
mutex_unlock(desc->mux)<br />
<br />
mutex_lock(desc->mux)<br />
desc->mux_owner = NULL;<br />
mutex_unlock(desc->mux)<br />
<br />
This sequence leads to a state where the pin appears to be in use<br />
(`mux_usecount == 1`) but has no owner (`mux_owner == NULL`), which can<br />
cause NULL pointer on next pin_request on the same pin.<br />
<br />
Ensure that updates to mux_usecount and mux_owner are performed<br />
atomically under the same lock. Only clear mux_owner when mux_usecount<br />
reaches zero and no new owner has been assigned.
Impact
Base Score 3.x
4.70
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6.66 (including) | 6.6.102 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.12.5 (including) | 6.12.42 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.15.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.16 (including) | 6.16.1 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0b075c011032f88d1cfde3b45d6dcf08b44140eb
- https://git.kernel.org/stable/c/22b585cbd67d14df3b91529d1b990661c300faa9
- https://git.kernel.org/stable/c/9b2a3e7189028aa7c4d53a84364f2ea9fb209787
- https://git.kernel.org/stable/c/9ea3f6b9a67be3476e331ce51cac316c2614a564
- https://git.kernel.org/stable/c/b7bd6e3971eb7f0e34d2fdce1b18b08094e0c804



