🇰🇷 한글 설명
Linux 커널의 watchdog 드라이버 cpu5wdt에서 모듈 제거 시 del_timer()를 사용해 타이머 핸들러 실행 중에도 포트 영역이 해제되어, 해제된 메모리에 outb()로 접근하는 use-after-free 취약점이 존재합니다. 수정은 del_timer()를 timer_shutdown_sync()로 교체하여 핸들러 종료를 보장하는 것입니다.
💡 쉬운 설명
컴퓨터의 워치독 기능을 담당하는 드라이버를 제거하는 과정에서 타이머가 이미 지워진 메모리 영역에 접근할 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 악용될 가능성이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger
When the cpu5wdt module is removing, the origin code uses del_timer() to
de-activate the timer. If the timer handler is running, del_timer() could
not stop it and will return directly. If the port region is released by
release_region() and then the timer handler cpu5wdt_trigger() calls outb()
to write into the region that is released, the use-after-free bug will
happen.
Change del_timer() to timer_shutdown_sync() in order that the timer handler
could be finished before the port region is released.
📍 영향받는 시스템
수정 이전의 Linux 커널 (cpu5wdt watchdog 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자가 드라이버 제거 과정의 타이밍을 조작해 해제된 메모리 접근을 유발하여 커널 충돌 또는 권한 상승을 시도할 수 있음
🛡️ 대응 방법
커널을 CVE-2024-38630 수정이 포함된 최신 안정 버전으로 업데이트하거나 배포판 보안 패치를 적용
🔧 검증 코드
출력된 커널 버전을 배포판의 보안 권고문과 비교하여 CVE-2024-38630 패치가 포함된 버전인지 확인하고, lsmod | grep cpu5wdt 결과가 없으면 해당 드라이버가 로드되지 않아 영향이 없음을 함께 확인