🇰🇷 한글 설명
Linux 커널의 posix-cpu-timers 구성 요소에서 handle_posix_cpu_timers()와 posix_cpu_timer_del() 함수 간의 레이스 컨디션 취약점이 발견되었습니다. 종료 중인 작업이 특정 시점에 부모 프로세스나 디버거에 의해 수거될 때, 타이머 삭제 함수가 타이머 상태를 제대로 감지하지 못하는 문제가 발생합니다. 이를 해결하기 위해 run_posix_cpu_timers() 내에 작업의 종료 상태를 확인하는 로직이 추가되었습니다.
💡 쉬운 설명
컴퓨터 프로그램이 종료되는 순간 타이머를 삭제하려는 동작이 서로 충돌하여 오류가 발생할 수 있는 문제입니다. 이 충돌로 인해 시스템이 불안정해지거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()
If an exiting non-autoreaping task has already passed exit_notify() and
calls handle_posix_cpu_timers() from IRQ, it can be reaped by its parent
or debugger right after unlock_task_sighand().
If a concurrent posix_cpu_timer_del() runs at that moment, it won't be
able to detect timer->it.cpu.firing != 0: cpu_timer_task_rcu() and/or
lock_task_sighand() will fail.
Add the tsk->exit_state check into run_posix_cpu_timers() to fix this.
This fix is not needed if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y, because
exit_task_work() is called before exit_notify(). But the check still
makes sense, task_work_add(&tsk->posix_cputimers_work.work) will fail
anyway in this case.
📍 영향받는 시스템
Linux Kernel (posix-cpu-timers 기능이 활성화된 버전)
⚔️ 공격 벡터
로컬 시스템에서 특정 타이머 관련 시스템 호출을 정밀하게 조작하여 레이스 컨디션을 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인