🇰🇷 한글 설명
Linux 커널의 media bttv 드라이버에서 타이머 함수와 장치 제거 함수 간의 경쟁 상태로 인해 Use-After-Free 취약점이 발생합니다. 장치가 제거될 때 타이머가 적절히 삭제되지 않아, 이미 해제된 메모리 영역에 접근을 시도할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 제거하는 과정에서 작동 중이던 타이머를 끄지 않아, 이미 사라진 부품의 정보를 다시 읽으려다 오류가 발생하는 문제입니다. 이로 인해 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: bttv: fix use after free error due to btv->timeout timer
There may be some a race condition between timer function
bttv_irq_timeout and bttv_remove. The timer is setup in
probe and there is no timer_delete operation in remove
function. When it hit kfree btv, the function might still be
invoked, which will cause use after free bug.
This bug is found by static analysis, it may be false positive.
Fix it by adding del_timer_sync invoking to the remove function.
cpu0 cpu1
bttv_probe
->timer_setup
->bttv_set_dma
->mod_timer;
bttv_remove
->kfree(btv);
->bttv_irq_timeout
->USE btv
📍 영향받는 시스템
Linux Kernel (media: bttv 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
특정 하드웨어 드라이버의 타이머와 장치 제거 프로세스 간의 타이밍을 이용한 로컬 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하거나, bttv_remove 함수에 del_timer_sync가 포함된 패치를 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인합니다.