{
  "id": "CVE-2026-31426",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-31426",
  "published_at": "2026-04-13T13:40:29.635Z",
  "title": "ACPI: EC: clean up handlers on probe failure in acpi_ec_setup()",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nACPI: EC: clean up handlers on probe failure in acpi_ec_setup()\n\nWhen ec_install_handlers() returns -EPROBE_DEFER on reduced-hardware\nplatforms, it has already started the EC and installed the address\nspace handler with the struct acpi_ec pointer as handler context.\nHowever, acpi_ec_setup() propagates the error without any cleanup.\n\nThe caller acpi_ec_add() then frees the struct acpi_ec for non-boot\ninstances, leaving a dangling handler context in ACPICA.\n\nAny subsequent AML evaluation that accesses an EC OpRegion field\ndispatches into acpi_ec_space_handler() with the freed pointer,\ncausing a use-after-free:\n\n BUG: KASAN: slab-use-after-free in mutex_lock (kernel/locking/mutex.c:289)\n Write of size 8 at addr ffff88800721de38 by task init/1\n Call Trace:\n  \u003cTASK\u003e\n  mutex_lock (kernel/locking/mutex.c:289)\n  acpi_ec_space_handler (drivers/acpi/ec.c:1362)\n  acpi_ev_address_space_dispatch (drivers/acpi/acpica/evregion.c:293)\n  acpi_ex_access_region (drivers/acpi/acpica/exfldio.c:246)\n  acpi_ex_field_datum_io (drivers/acpi/acpica/exfldio.c:509)\n  acpi_ex_extract_from_field (drivers/acpi/acpica/exfldio.c:700)\n  acpi_ex_read_data_from_field (drivers/acpi/acpica/exfield.c:327)\n  acpi_ex_resolve_node_to_value (drivers/acpi/acpica/exresolv.c:392)\n  \u003c/TASK\u003e\n\n Allocated by task 1:\n  acpi_ec_alloc (drivers/acpi/ec.c:1424)\n  acpi_ec_add (drivers/acpi/ec.c:1692)\n\n Freed by task 1:\n  kfree (mm/slub.c:6876)\n  acpi_ec_add (drivers/acpi/ec.c:1751)\n\nThe bug triggers on reduced-hardware EC platforms (ec-\u003egpe \u003c 0)\nwhen the GPIO IRQ provider defers probing. Once the stale handler\nexists, any unprivileged sysfs read that causes AML to touch an\nEC OpRegion (battery, thermal, backlight) exercises the dangling\npointer.\n\nFix this by calling ec_remove_handlers() in the error path of\nacpi_ec_setup() before clearing first_ec. ec_remove_handlers()\nchecks each EC_FLAGS_* bit before acting, so it is safe to call\nregardless of how far ec_install_handlers() progressed:\n\n  -ENODEV  (handler not installed): only calls acpi_ec_stop()\n  -EPROBE_DEFER (handler installed): removes handler, stops EC",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:5.7:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 03e9a0e05739cf872fee494b06c75c0469704a21, \u003c 022d1727f33ff90b3e1775125264e3023901952e",
          "\u003e= 03e9a0e05739cf872fee494b06c75c0469704a21, \u003c 9c886e63b69658959633937e3acb7ca8addf7499",
          "\u003e= 03e9a0e05739cf872fee494b06c75c0469704a21, \u003c 808c0f156f48d5b8ca34088cbbfba8444e606cbc",
          "\u003e= 03e9a0e05739cf872fee494b06c75c0469704a21, \u003c d04c007047c88158141d9bd5eac761cdadd3782c",
          "\u003e= 03e9a0e05739cf872fee494b06c75c0469704a21, \u003c be1a827e15991e874e0d5222d0ea5fdad01960fe",
          "\u003e= 03e9a0e05739cf872fee494b06c75c0469704a21, \u003c f6484cadbcaf26b5844b51bd7307a663dda48ef6"
        ],
        "fixed_in": [
          "022d1727f33ff90b3e1775125264e3023901952e",
          "9c886e63b69658959633937e3acb7ca8addf7499",
          "808c0f156f48d5b8ca34088cbbfba8444e606cbc",
          "d04c007047c88158141d9bd5eac761cdadd3782c",
          "be1a827e15991e874e0d5222d0ea5fdad01960fe",
          "f6484cadbcaf26b5844b51bd7307a663dda48ef6"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.7"
        ],
        "fixed_in": [
          "0",
          "6.1.168",
          "6.6.131",
          "6.12.80",
          "6.18.21",
          "6.19.11",
          "7.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 022d1727f33ff90b3e1775125264e3023901952e or 9c886e63b69658959633937e3acb7ca8addf7499 or 808c0f156f48d5b8ca34088cbbfba8444e606cbc or d04c007047c88158141d9bd5eac761cdadd3782c or be1a827e15991e874e0d5222d0ea5fdad01960fe or f6484cadbcaf26b5844b51bd7307a663dda48ef6 or later.",
      "Upgrade Linux to 0 or 6.1.168 or 6.6.131 or 6.12.80 or 6.18.21 or 6.19.11 or 7.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
