🇰🇷 한글 설명
Linux 커널의 net_sched 구성 요소 중 gen_estimator 모듈에서 CONFIG_PREEMPT_RT 설정이 활성화된 경우 타이머 콜백이 선점될 수 있는 취약점이 발견되었습니다. 이로 인해 seqlock 관련 경고가 발생하며 시스템 안정성에 영향을 줄 수 있습니다. 이를 해결하기 위해 preempt_disable_nested() 및 preempt_enable_nested()를 도입하여 수정되었습니다.
💡 쉬운 설명
실시간 처리를 위해 설정된 리눅스 시스템에서 타이머가 작동하는 도중 다른 작업이 끼어들어 데이터가 꼬일 수 있는 문제입니다. 이로 인해 시스템에 경고가 발생하거나 예기치 않은 동작이 일어날 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net_sched: gen_estimator: fix est_timer() vs CONFIG_PREEMPT_RT=y
syzbot reported a WARNING in est_timer() [1]
Problem here is that with CONFIG_PREEMPT_RT=y, timer callbacks
can be preempted.
Adopt preempt_disable_nested()/preempt_enable_nested() to fix this.
[1]
WARNING: CPU: 0 PID: 16 at ./include/linux/seqlock.h:221 __seqprop_assert include/linux/seqlock.h:221 [inline]
WARNING: CPU: 0 PID: 16 at ./include/linux/seqlock.h:221 est_timer+0x6dc/0x9f0 net/core/gen_estimator.c:93
Modules linked in:
CPU: 0 UID: 0 PID: 16 Comm: ktimers/0 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:__seqprop_assert include/linux/seqlock.h:221 [inline]
RIP: 0010:est_timer+0x6dc/0x9f0 net/core/gen_estimator.c:93
Call Trace:
<TASK>
call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747
expire_timers kernel/time/timer.c:1798 [inline]
__run_timers kernel/time/timer.c:2372 [inline]
__run_timer_base+0x648/0x970 kernel/time/timer.c:2384
run_timer_base kernel/time/timer.c:2393 [inline]
run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403
handle_softirqs+0x22c/0x710 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
run_ktimerd+0xcf/0x190 kernel/softirq.c:1043
smpboot_thread_fn+0x53f/0xa60 kernel/smpboot.c:160
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
📍 영향받는 시스템
CONFIG_PREEMPT_RT=y 옵션이 활성화된 Linux 커널 (gen_estimator 모듈 사용 시)
⚔️ 공격 벡터
로컬 시스템에서 특정 네트워크 스케줄링 조건 및 실시간 커널 설정을 이용한 레이스 컨디션 유발
🛡️ 대응 방법
커널 패치를 적용하여 gen_estimator.c의 est_timer() 함수에 선점 방지 로직을 추가한 최신 커널로 업데이트
🔧 검증 코드
출력 결과에 CONFIG_PREEMPT_RT=y가 포함되어 있는지 확인하고, 커널 버전이 취약점이 해결된 패치 버전인지 확인합니다.
uname -a && grep CONFIG_PREEMPT_RT /boot/config-$(uname -r)