🇰🇷 한글 설명
Linux 커널의 BPF 시스템 콜 헬퍼 함수들이 잠들 수 있는(sleepable) 상태임을 명시하지 않아 발생하는 취약점입니다. 이로 인해 타이머 콜백과 같은 원자적(atomic) 컨텍스트에서 해당 함수를 호출할 경우 스케줄링 오류가 발생할 수 있습니다. 커널 패치를 통해 해당 함수들에 .might_sleep 속성을 추가하여 컨텍스트 검사를 강화했습니다.
💡 쉬운 설명
컴퓨터의 핵심 엔진인 커널에서 잠시 쉬어야 하는 작업을, 쉬면 안 되는 긴급한 상황에서 실행하려고 할 때 충돌이 발생하는 문제입니다. 이로 인해 시스템이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Mark syscall helpers as sleepable
bpf_sys_bpf() executes the bpf(2) syscall body, which can take mutexes,
allocate with GFP_KERNEL, and wait for an RCU grace period.
bpf_sys_close() reaches close_fd() and filp_close(), which can sleep as
well.
Both helpers are limited to BPF_PROG_TYPE_SYSCALL, whose main program is
sleepable. That does not make every callback sleepable: a syscall program
can register a bpf_timer callback, and the verifier checks that callback
in a non-sleepable context while retaining the syscall helper set.
Without .might_sleep on the prototypes, such a callback can invoke
bpf_sys_bpf() from hrtimer softirq context and trigger a
scheduling-while-atomic failure. bpf_sys_close() is exposed through the
same missing context check.
Set .might_sleep on both prototypes so the existing helper-context check
rejects them from timer callbacks and other atomic regions. Calls from the
sleepable main body remain valid.
📍 영향받는 시스템
Linux Kernel (BPF 관련 기능이 활성화된 버전)
⚔️ 공격 벡터
BPF 타이머 콜백을 사용하여 원자적 컨텍스트 내에서 sleepable 시스템 콜 헬퍼를 호출하도록 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인