CVE-2025-21943: gpio: aggregator: protect driver attr handlers against module unload
In the Linux kernel, the following vulnerability has been resolved:
gpio: aggregator: protect driver attr handlers against module unload
Both new_device_store and delete_device_store touch module global
resources (e.g. gpio_aggregator_lock). To prevent race conditions with
module unload, a reference needs to be held.
Add try_module_get() in these handlers.
For new_device_store, this eliminates what appears to be the most dangerous
scenario: if an id is allocated from gpio_aggregator_idr but
platform_device_register has not yet been called or completed, a concurrent
module unload could fail to unregister/delete the device, leaving behind a
dangling platform device/GPIO forwarder. This can result in various issues.
The following simple reproducer demonstrates these problems:
#!/bin/bash
while :; do
# note: whether 'gpiochip0 0' exists or not does not matter.
echo 'gpiochip0 0' > /sys/bus/platform/drivers/gpio-aggregator/new_device
done &
while :; do
modprobe gpio-aggregator
modprobe -r gpio-aggregator
done &
wait
Starting with the following warning, several kinds of warnings will appear
and the system may become unstable:
------------[ cut here ]------------
list_del corruption, ffff888103e2e980->next is LIST_POISON1 (dead000000000100)
WARNING: CPU: 1 PID: 1327 at lib/list_debug.c:56 __list_del_entry_valid_or_report+0xa3/0x120
[...]
RIP: 0010:__list_del_entry_valid_or_report+0xa3/0x120
[...]
Call Trace:
<TASK>
? __list_del_entry_valid_or_report+0xa3/0x120
? __warn.cold+0x93/0xf2
? __list_del_entry_valid_or_report+0xa3/0x120
? report_bug+0xe6/0x170
? __irq_work_queue_local+0x39/0xe0
? handle_bug+0x58/0x90
? exc_invalid_op+0x13/0x60
? asm_exc_invalid_op+0x16/0x20
? __list_del_entry_valid_or_report+0xa3/0x120
gpiod_remove_lookup_table+0x22/0x60
new_device_store+0x315/0x350 [gpio_aggregator]
kernfs_fop_write_iter+0x137/0x1f0
vfs_write+0x262/0x430
ksys_write+0x60/0xd0
do_syscall_64+0x6c/0x180
entry_SYSCALL_64_after_hwframe+0x76/0x7e
[...]
</TASK>
---[ end trace 0000000000000000 ]---
Security readout for executives and security teams
Plain-English summary
CVE-2025-21943 is a Linux kernel reliability flaw in the GPIO aggregator driver. A local user with limited privileges could trigger a timing race while the module is loading or unloading, potentially making the system unstable. The disclosed impact is availability, not data theft or privilege escalation.
Executive priority
Treat this as a routine but real kernel stability risk. It is not documented as remotely exploitable or actively exploited, but shared systems and appliances with local user access should receive kernel updates through normal vulnerability maintenance windows.
Technical view
The issue is a CWE-362 race in gpio-aggregator driver attribute handlers. new_device_store and delete_device_store accessed module-global resources during concurrent module unload without holding a module reference. The fix adds try_module_get to protect those handlers. Reported outcomes include dangling platform device/GPIO forwarder state, list corruption warnings, and possible instability.
Likely exposure
Exposure is most relevant to Linux systems running affected kernel builds where gpio-aggregator is present and reachable. The CVE record lists affected Linux versions including 5.8 and several stable branch points through 6.14. Systems without this driver loaded or accessible have lower practical exposure.
Exploitation context
The CVSS vector is local, high complexity, low privileges, no user interaction, with high availability impact. The source includes a race reproducer, but KEV is false and the provided sources do not state active exploitation in the wild.
Researcher notes
The important boundary is availability. The provided evidence supports a local race causing corruption and instability, not confidentiality loss, integrity compromise, or privilege escalation. Confirm branch-specific fix status from kernel stable commits or distro advisories before declaring a host remediated.
Mitigation direction
Update to a kernel containing the referenced gpio-aggregator fixes.
Follow Linux distribution advisories for backported kernel packages.
Restrict unnecessary local access to gpio-aggregator sysfs driver controls.
Disable or avoid loading gpio-aggregator where it is not operationally required.
Prioritize systems where untrusted local users can access kernel driver interfaces.
Validation and detection
Inventory kernel versions against the CVE affected version list.
Check whether gpio-aggregator is built, loadable, or currently loaded.
Confirm installed kernel packages include the vendor backport or stable fix.
Review system logs for related list corruption or gpio-aggregator instability warnings.
Validate local access controls around platform driver sysfs attributes.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-362: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-362 · source CWE mapping
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.