CVE-2026-31426

Source
https://cve.org/CVERecord?id=CVE-2026-31426
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31426.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-31426
Downstream
Published
2026-04-13T13:40:29.635Z
Modified
2026-04-28T04:12:42.173254Z
Severity
  • 7.0 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
ACPI: EC: clean up handlers on probe failure in acpi_ec_setup()
Details

In the Linux kernel, the following vulnerability has been resolved:

ACPI: EC: clean up handlers on probe failure in acpiecsetup()

When ecinstallhandlers() returns -EPROBEDEFER on reduced-hardware platforms, it has already started the EC and installed the address space handler with the struct acpiec pointer as handler context. However, acpiecsetup() propagates the error without any cleanup.

The caller acpiecadd() 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 acpiecspace_handler() with the freed pointer, causing a use-after-free:

BUG: KASAN: slab-use-after-free in mutexlock (kernel/locking/mutex.c:289) Write of size 8 at addr ffff88800721de38 by task init/1 Call Trace: <TASK> mutexlock (kernel/locking/mutex.c:289) acpiecspacehandler (drivers/acpi/ec.c:1362) acpievaddressspacedispatch (drivers/acpi/acpica/evregion.c:293) acpiexaccessregion (drivers/acpi/acpica/exfldio.c:246) acpiexfielddatumio (drivers/acpi/acpica/exfldio.c:509) acpiexextractfromfield (drivers/acpi/acpica/exfldio.c:700) acpiexreaddatafromfield (drivers/acpi/acpica/exfield.c:327) acpiexresolvenodetovalue (drivers/acpi/acpica/exresolv.c:392) </TASK>

Allocated by task 1: acpiecalloc (drivers/acpi/ec.c:1424) acpiecadd (drivers/acpi/ec.c:1692)

Freed by task 1: kfree (mm/slub.c:6876) acpiecadd (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 ecremovehandlers() in the error path of acpiecsetup() before clearing firstec. ecremovehandlers() checks each ECFLAGS_* bit before acting, so it is safe to call regardless of how far ecinstallhandlers() progressed:

-ENODEV (handler not installed): only calls acpiecstop() -EPROBE_DEFER (handler installed): removes handler, stops EC

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31426.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
03e9a0e05739cf872fee494b06c75c0469704a21
Fixed
022d1727f33ff90b3e1775125264e3023901952e
Fixed
9c886e63b69658959633937e3acb7ca8addf7499
Fixed
808c0f156f48d5b8ca34088cbbfba8444e606cbc
Fixed
d04c007047c88158141d9bd5eac761cdadd3782c
Fixed
be1a827e15991e874e0d5222d0ea5fdad01960fe
Fixed
f6484cadbcaf26b5844b51bd7307a663dda48ef6

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31426.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.7.0
Fixed
6.1.168
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.131
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.80
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.21
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
6.19.11

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31426.json"