🇰🇷 한글 설명
Linux 커널의 mediatek pinctrl 드라이버에서 GPIO 칩 등록 시 관리되지 않는 함수를 사용하여 발생하는 Use-After-Free 취약점입니다. 드라이버가 모듈로 빌드되어 제거될 때, 메모리는 해제되지만 GPIO 칩은 여전히 등록된 상태로 남아 시스템 불안정이나 보안 문제를 유발할 수 있습니다.
💡 쉬운 설명
장치를 제거할 때 메모리는 먼저 지워지는데, 시스템은 여전히 그 메모리가 사용 중이라고 착각하여 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: mediatek: use devm_gpiochip_add_data() for GPIO chip
The gpio_chip is allocated with device-managed memory but registered with
the non-managed gpiochip_add_data(). This was harmless while the drivers
were built-in, but once they can be built as modules and unbound/rmmod'd,
devm frees the gpio_chip's memory while it is still registered, causing a
use-after-free.
Register it with devm_gpiochip_add_data() so it shares the same
device-managed lifecycle, which also lets the manual gpiochip_remove()
error paths go away.
📍 영향받는 시스템
MediaTek 칩셋을 사용하는 Linux 커널 기반 시스템 (드라이버가 모듈로 빌드된 경우)
⚔️ 공격 벡터
로컬 공격자가 드라이버 모듈을 로드 및 언로드(rmmod)하여 메모리 오류를 유발할 수 있음
🛡️ 대응 방법
커널을 최신 패치가 적용된 버전으로 업데이트하여 devm_gpiochip_add_data()가 적용된 드라이버를 사용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.