🔍 CVE-2026-80563

0.0
CVSS Score
UNKNOWN
2026-08-26
2026-08-26 15:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 gpio: sloppy-logic-analyzer 드라이버에서 unbind 발생 시 debugfs를 통해 use-after-free 취약점이 발생합니다. debugfs_create_file_unsafe()를 사용하여 생성된 파일이 실행 중인 쓰기 핸들러를 기다리지 않고 메모리가 해제되어 발생합니다.

💡 쉬운 설명

장치를 제거하는 과정에서 메모리가 먼저 삭제되었음에도 불구하고, 시스템이 해당 메모리에 데이터를 쓰려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: gpio: sloppy-logic-analyzer: fix use-after-free via debugfs trigger on unbind The "trigger" debugfs file has a hand-rolled ->write handler (trigger_write()) that dereferences the per-device gpio_la_poll_priv. The file is created with debugfs_create_file_unsafe(), and the handler never takes a debugfs reference. Nothing keeps the object alive while the handler runs. priv is allocated with devm_kzalloc(). devres frees it when the platform device is unbound. debugfs_create_file_unsafe() installs no full_proxy wrapper, so debugfs_remove_recursive() in gpio_la_poll_remove() does not wait for an in-flight trigger_write(). The blob_lock taken there does not help, because trigger_write() never takes it. A write that races an unbind therefore writes into freed memory: trigger_write() gpio_la_poll_remove() priv = m->private buf = memdup_user() [may sleep] mutex_lock(&priv->blob_lock) debugfs_remove_recursive() [no wait] mutex_unlock(&priv->blob_lock) (remove returns; devres frees priv) priv->trig_data = buf <-- use-after-free write priv->trig_len = count The race is reachable by root via /sys/bus/platform/drivers/gpio-sloppy-logic-analyzer/unbind. Create "trigger" with debugfs_create_file() instead. Its full_proxy wrapper makes debugfs_remove_recursive() drain any in-flight ->write before it returns. The use-after-free is confirmed under KASAN with a minimal reproducer of the same debugfs_create_file_unsafe() plus devm_kzalloc() pattern (available on request); it produces a slab-use-after-free write in the handler.

📍 영향받는 시스템

Linux kernel (gpio: sloppy-logic-analyzer 드라이버 사용 환경)

⚔️ 공격 벡터

루트 권한을 가진 사용자가 /sys/bus/platform/drivers/gpio-sloppy-logic-analyzer/unbind를 통해 race condition 유도

🛡️ 대응 방법

debugfs_create_file_unsafe() 대신 debugfs_create_file()을 사용하여 핸들러가 완료될 때까지 메모리 해제를 방지하도록 커널 패치 적용

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel