CVE-2026-31426
ACPI: EC: clean up handlers on probe failure in acpi_ec_setup()
Check your servers for CVE-2026-31426
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31426 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
ACPI: EC: clean up handlers on probe failure in acpi_ec_setup()
When ec_install_handlers() returns -EPROBE_DEFER on reduced-hardware platforms, it has already started the EC and installed the address space handler with the struct acpi_ec pointer as handler context. However, acpi_ec_setup() propagates the error without any cleanup.
The caller acpi_ec_add() then frees the struct acpi_ec for non-boot instances, leaving a dangling handler context in ACPICA.
Any subsequent AML evaluation that accesses an EC OpRegion field dispatches into acpi_ec_space_handler() with the freed pointer, causing a use-after-free:
BUG: KASAN: slab-use-after-free in mutex_lock (kernel/locking/mutex.c:289) Write of size 8 at addr ffff88800721de38 by task init/1 Call Trace: <TASK> mutex_lock (kernel/locking/mutex.c:289) acpi_ec_space_handler (drivers/acpi/ec.c:1362) acpi_ev_address_space_dispatch (drivers/acpi/acpica/evregion.c:293) acpi_ex_access_region (drivers/acpi/acpica/exfldio.c:246) acpi_ex_field_datum_io (drivers/acpi/acpica/exfldio.c:509) acpi_ex_extract_from_field (drivers/acpi/acpica/exfldio.c:700) acpi_ex_read_data_from_field (drivers/acpi/acpica/exfield.c:327) acpi_ex_resolve_node_to_value (drivers/acpi/acpica/exresolv.c:392) </TASK>
Allocated by task 1: acpi_ec_alloc (drivers/acpi/ec.c:1424) acpi_ec_add (drivers/acpi/ec.c:1692)
Freed by task 1: kfree (mm/slub.c:6876) acpi_ec_add (drivers/acpi/ec.c:1751)
The bug triggers on reduced-hardware EC platforms (ec->gpe < 0) when the GPIO IRQ provider defers probing. Once the stale handler exists, any unprivileged sysfs read that causes AML to touch an EC OpRegion (battery, thermal, backlight) exercises the dangling pointer.
Fix this by calling ec_remove_handlers() in the error path of acpi_ec_setup() before clearing first_ec. ec_remove_handlers() checks each EC_FLAGS_* bit before acting, so it is safe to call regardless of how far ec_install_handlers() progressed:
-ENODEV (handler not installed): only calls acpi_ec_stop() -EPROBE_DEFER (handler installed): removes handler, stops EC
Severity (CVSS)
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 2.79% of all scored CVEs. Scores of 30 Nov 2026.
The assessment of CISA (SSVC, 16 Oct 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-416 Use After Free
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 03e9a0e05739cf872fee494b06c75c0469704a21, before 022d1727f33ff90b3e1775125264e3023901952e affected from 03e9a0e05739cf872fee494b06c75c0469704a21, before 9c886e63b69658959633937e3acb7ca8addf7499 affected from 03e9a0e05739cf872fee494b06c75c0469704a21, before 808c0f156f48d5b8ca34088cbbfba8444e606cbc affected from 03e9a0e05739cf872fee494b06c75c0469704a21, before d04c007047c88158141d9bd5eac761cdadd3782c affected from 03e9a0e05739cf872fee494b06c75c0469704a21, before be1a827e15991e874e0d5222d0ea5fdad01960fe affected from 03e9a0e05739cf872fee494b06c75c0469704a21, before f6484cadbcaf26b5844b51bd7307a663dda48ef6
Other versions: unaffected
|
| Linux |
affected 5.7 unaffected before 5.7 unaffected from 6.1.168 up to and including 6.1.* unaffected from 6.6.131 up to and including 6.6.* unaffected from 6.12.80 up to and including 6.12.* unaffected from 6.18.21 up to and including 6.18.* unaffected from 6.19.11 up to and including 6.19.* unaffected 7.0 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31426 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31426
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-31426
trivy image --scanners vuln IMAGE | grep CVE-2026-31426
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/022d1727f33ff90b3e1775125264e3023901952e git.kernel.org
- https://git.kernel.org/stable/c/9c886e63b69658959633937e3acb7ca8addf7499 git.kernel.org
- https://git.kernel.org/stable/c/808c0f156f48d5b8ca34088cbbfba8444e606cbc git.kernel.org
- https://git.kernel.org/stable/c/d04c007047c88158141d9bd5eac761cdadd3782c git.kernel.org
- https://git.kernel.org/stable/c/be1a827e15991e874e0d5222d0ea5fdad01960fe git.kernel.org
- https://git.kernel.org/stable/c/f6484cadbcaf26b5844b51bd7307a663dda48ef6 git.kernel.org
Source: the record CVE-2026-31426 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse