🇰🇷 한글 설명
Linux 커널의 reset GPIO 컨트롤러가 sysfs의 bind/unbind 속성을 억제하지 않아, 사용자 공간에서 동적으로 생성된 reset 디바이스를 언바인드할 수 있게 되었습니다. 이는 reset 제어 핸들을 사용 중인 프로세스에서 use-after-free 취약점을 유발합니다.
💡 쉬운 설명
리눅스 시스템의 중요한 reset 제어 장치를 일반 사용자가 비활성화할 수 있는 결함입니다. 이렇게 되면 이미 해제된 메모리에 접근하려는 프로그램들이 충돌하거나 공격당할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
reset: gpio: suppress bind attributes in sysfs
This is a special device that's created dynamically and is supposed to
stay in memory forever. We also currently don't have a devlink between
it and the actual reset consumer. Suppress sysfs bind attributes so that
user-space can't unbind the device because - as of now - it will cause a
use-after-free splat from any user that puts the reset control handle.
📍 영향받는 시스템
Linux kernel drivers/reset/reset-gpio.c 모듈 - 5.10 이상 미패치 버전
⚔️ 공격 벡터
로컬 사용자가 /sys/bus/platform/drivers/gpio-reset/bind 파일을 통해 reset GPIO 디바이스를 언바인드 수행
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업그레이드하여 sysfs bind 속성 억제 패치 적용
🔧 검증 코드
PATCHED 결과 = 취약점 수정됨 (bind 속성이 sysfs에서 보이지 않음), VULNERABLE 결과 = 취약점 존재 (bind 속성이 노출되어 언바인드 가능)
test ! -e /sys/bus/platform/drivers/gpio-reset/bind && echo 'PATCHED: bind suppressed' || echo 'VULNERABLE: bind attribute exposed'