🇰🇷 한글 설명
Linux 커널의 drop_monitor 모듈에서 타이머 종료 과정 중 타이머가 다시 활성화될 수 있는 취약점이 발견되었습니다. 이로 인해 모듈이 언로드된 후에도 타이머가 실행되어 해제된 메모리에 접근하는 Use-After-Free 및 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
시스템이 특정 기능을 끌 때 타이머를 완전히 멈추지 못해, 이미 삭제된 메모리 영역을 다시 사용하려고 시도하면서 컴퓨터가 멈추는 문제입니다. 이는 시스템의 안정성을 해치고 갑작스러운 재부팅을 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drop_monitor: use timer_shutdown_sync() to prevent timer rearming during teardown
In drop_monitor teardown paths (net_dm_trace_off_set(),
net_dm_hw_monitor_stop(), and error unwind paths in net_dm_trace_on_set()
and net_dm_hw_monitor_start()), per-CPU timers are stopped using
timer_delete_sync() followed by cancel_work_sync().
However, there is a circular dependency between send_timer and
dm_alert_work:
1) sched_send_work() (timer callback) schedules dm_alert_work.
2) send_dm_alert() / net_dm_hw_summary_work() calls reset_per_cpu_data()
or net_dm_hw_reset_per_cpu_data().
3) If memory allocation fails under memory pressure in the reset
function, it re-arms the timer via mod_timer(&data->send_timer, ...).
If dm_alert_work is running concurrently while timer_delete_sync()
executes on another CPU, an allocation failure in the worker will
re-arm the timer after timer_delete_sync() has already returned.
Once cancel_work_sync() completes and module_put() is called, the timer
remains active in the timer wheel. If the module is then unloaded, the
timer will fire and execute sched_send_work() in freed memory,
triggering a kernel panic / use-after-free.
Switch from timer_delete_sync() to timer_shutdown_sync(). This guarantees
that any in-flight timer handler has finished and prevents subsequent
re-arming attempts from running workers from succeeding. When monitoring
is restarted later, timer_setup() is invoked, which cleanly
re-initializes the timer.
📍 영향받는 시스템
Linux Kernel (drop_monitor 모듈을 사용하는 버전)
⚔️ 공격 벡터
메모리 압박 상황을 유도하여 타이머 재활성화를 유발함으로써 커널 패닉을 일으키는 로컬 공격
🛡️ 대응 방법
timer_delete_sync() 대신 timer_shutdown_sync()를 사용하도록 커널을 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.