🇰🇷 한글 설명
Linux 커널의 BPF 기능 중 __rhtab_map_lookup_and_delete_batch() 함수에서 CPU 마이그레이션 보호가 누락된 취약점입니다. CONFIG_PREEMPT_RCU 설정 환경에서 작업이 CPU 간에 이동할 경우 this_cpu_ptr() 호출 시 커널 버그(BUG)가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 작업 단위가 실행 중에 다른 CPU로 갑자기 옮겨가면서 시스템이 혼란을 겪어 오류가 발생하는 문제입니다. 이로 인해 시스템이 멈추거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch()
bpf_mem_cache_free_rcu() uses this_cpu_ptr() which requires migration
to be disabled. All callers of rhtab_delete_elem() disable migration
except __rhtab_map_lookup_and_delete_batch(), which calls it under
rcu_read_lock() only.
On CONFIG_PREEMPT_RCU, rcu_read_lock() does not disable preemption or
migration, so the task can migrate between CPUs during the delete loop,
causing this_cpu_ptr() to trigger:
BUG: using smp_processor_id() in preemptible [00000000] code
Fix by wrapping the delete loop in migrate_disable()/migrate_enable()
in __rhtab_map_lookup_and_delete_batch(), matching the migration
protection that the other callers already provide.
📍 영향받는 시스템
Linux kernel (CONFIG_PREEMPT_RCU 설정이 활성화된 환경)
⚔️ 공격 벡터
로컬 공격자가 BPF를 통해 특정 조건의 삭제 루프를 유도하여 커널 패닉을 발생시킴
🛡️ 대응 방법
커널 업데이트를 통해 __rhtab_map_lookup_and_delete_batch() 함수에 migrate_disable()/enable() 보호 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인