🇰🇷 한글 설명
Linux 커널의 BPF 컴파일러에서 부호 확장(sign-extension) 과정 중 스칼라 ID가 잘못 유지되어 발생하는 취약점입니다. 검증기(Verifier)가 레지스터의 실제 값과 다른 값을 가진 것으로 오판하게 만들어, 결과적으로 경계 외 메모리 접근(Out-of-bounds access)을 허용할 수 있습니다.
💡 쉬운 설명
컴퓨터가 숫자를 처리할 때 부호를 맞추는 과정에서 계산 오류가 발생하여, 보안 검사기를 속일 수 있는 문제입니다. 이를 통해 공격자가 허용되지 않은 메모리 영역에 접근할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Drop scalar id on sign-extending narrowing stack fills
When a spilled scalar is filled back with a sign-extending narrowing load
(BPF_MEMSX), check_stack_read_fixed_off() copies the spilled register
including its scalar id, but coerce_reg_to_size_sx() then sign-extends the
filled register's value. If the same slot is also filled with a plain
zero-extending load (BPF_MEM), both destination registers share the id yet
hold different values. A later 'if <zext-reg> == const' then refines the
sign-extended register through sync_linked_regs() to a value it does not
have at runtime (e.g. the verifier believes 0x80000000 while the register
is 0xffffffff80000000), which can be turned into an out-of-bounds access.
Drop the shared scalar id at the sign-extension site in check_mem_access()
when sign extension actually changes the value, mirroring the BPF_MOVSX
handling in check_alu_op() (no_sext = reg_umax < 2^(size*8-1)).
📍 영향받는 시스템
Linux Kernel (BPF 기능이 활성화된 버전)
⚔️ 공격 벡터
특수하게 조작된 BPF 프로그램을 로드하여 커널 검증기의 논리적 오류를 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인