🔍 CVE-2026-31426

7.0
CVSS Score
HIGH
2026-04-13
2026-10-19 19:17
✅ 완료

🇰🇷 한글 설명

Linux 커널 ACPI EC 드라이버에서 probe 실패 시 핸들러 cleanup이 제대로 되지 않아 발생하는 use-after-free 취약점. reduced-hardware 플랫폼에서 GPIO IRQ provider가 probe defer될 때 해제된 메모리 주소로 접근하여 시스템 crash 발생 가능.

💡 쉬운 설명

Linux 커널의 전원 관리 시스템 초기화 실패 시 메모리 정리를 하지 않아 이미 해제된 메모리에 접근하는 문제입니다. 일반 사용자가 sysfs를 통해 배터리나 온도 정보를 읽을 때 시스템이 crash될 수 있습니다.

🇺🇸 원문 (English)

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

📍 영향받는 시스템

Linux kernel 모든 버전 (reduced-hardware EC 플랫폼 사용 시스템, 특히 ARM/저전력 노트북)

⚔️ 공격 벡터

unprivileged user가 /sys 접근으로 EC OpRegion 필드 읽기 시도 (배터리 상태, 온도, 백라이트 제어)

🛡️ 대응 방법

Linux 커널을 ec_remove_handlers() cleanup이 추가된 최신 버전으로 업데이트 (일반적으로 5.16 이후 안정 버전)

🔧 검증 코드

커널 버전 확인 후 드라이버 소스에서 ec_remove_handlers 함수가 error path에서 호출되는지 확인하면 fix 적용 여부 판단 가능

Shell / Script
uname -r && grep -l 'ec_remove_handlers' /usr/src/linux-headers-$(uname -r)/drivers/acpi/ec.c 2>/dev/null || echo 'Check kernel source'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel