🇰🇷 한글 설명
Linux 커널의 멀티스레드 프로세스에서 SIGSTOP과 같은 중지 신호를 처리할 때 발생하는 레이스 컨디션 취약점입니다. execve() 호출 시 zap_other_threads() 함수가 호출 스레드의 JOBCTL_PENDING_MASK를 제대로 초기화하지 않아, 잘못된 상태값이 남아있을 경우 커널 경고(WARNING)를 발생시키며 시스템 불안정을 초래할 수 있습니다.
💡 쉬운 설명
여러 개의 작업이 동시에 일어날 때, 한 작업이 끝난 후 남은 찌꺼기 정보가 다른 작업에 영향을 주어 컴퓨터 시스템에 오류를 일으키는 문제입니다. 이로 인해 시스템이 예상치 못한 경고를 내보내거나 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
signal: clear JOBCTL_PENDING_MASK for caller in zap_other_threads()
When a multi-threaded process receives a stop signal (e.g., SIGSTOP),
do_signal_stop() sets JOBCTL_STOP_PENDING and JOBCTL_STOP_CONSUME on all
threads and sets signal->group_stop_count to the number of threads. If
one of the threads concurrently calls execve(), de_thread() invokes
zap_other_threads() to kill all other threads. zap_other_threads()
aborts the pending group stop by resetting signal->group_stop_count to 0
and clears the JOBCTL_PENDING_MASK for all other threads. However, it
fails to clear the job control flags for the calling thread.
When execve() completes, the calling thread returns to user mode and
checks for pending signals. Seeing the stale JOBCTL_STOP_PENDING flag,
it calls do_signal_stop(), which invokes task_participate_group_stop().
Since JOBCTL_STOP_CONSUME is still set, it attempts to decrement the
already-zero signal->group_stop_count, triggering a warning:
sig->group_stop_count == 0
WARNING: CPU: 1 PID: 6475 at kernel/signal.c:373
task_participate_group_stop+0x215/0x2d0
Call Trace:
<TASK>
do_signal_stop+0x3be/0x5c0 kernel/signal.c:2619
get_signal+0xa8c/0x1330 kernel/signal.c:2884
arch_do_signal_or_restart+0xbc/0x840 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x8c/0x4d0 kernel/entry/common.c:98
do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
</TASK>
Fix this race condition by clearing the JOBCTL_PENDING_MASK for the
calling thread in zap_other_threads(), ensuring it does not retain any
stale job control state after the thread group is destroyed. This aligns
with other functions that tear down a thread group and abort group
stops, such as zap_process() and complete_signal(), which correctly
clear these flags for all threads including the current one.
📍 영향받는 시스템
Linux Kernel (JOBCTL_PENDING_MASK 관련 race condition이 발생하는 버전)
⚔️ 공격 벡터
멀티스레드 프로세스에서 특정 신호(SIGSTOP)와 execve() 시스템 호출을 정밀하게 타이밍을 맞춰 동시에 실행하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 zap_other_threads() 내의 플래그 초기화 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 보안 공지(CVE-2026-53352)와 대조하여 확인