🇰🇷 한글 설명
Linux 커널의 BPF 검증기(verifier)에서 BPF_END(바이트 스왑) 연산 시 레지스터의 스칼라 ID를 초기화하지 않는 취약점입니다. 이로 인해 검증기가 잘못된 경계 값을 전파하여, 공격자가 검증기를 우회하고 허용되지 않은 메모리 영역에 접근할 수 있습니다.
💡 쉬운 설명
데이터의 순서를 바꾸는 과정에서 컴퓨터가 데이터의 범위를 잘못 계산하는 오류가 발견되었습니다. 이 오류를 이용하면 해커가 프로그램의 허용 범위를 벗어나 시스템 메모리를 몰래 들여다볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reset register ID for BPF_END value tracking
When a register undergoes a BPF_END (byte swap) operation, its scalar
value is mutated in-place. If this register previously shared a scalar ID
with another register (e.g., after an `r1 = r0` assignment), this tie must
be broken.
Currently, the verifier misses resetting `dst_reg->id` to 0 for BPF_END.
Consequently, if a conditional jump checks the swapped register, the
verifier incorrectly propagates the learned bounds to the linked register,
leading to false confidence in the linked register's value and potentially
allowing out-of-bounds memory accesses.
Fix this by explicitly resetting `dst_reg->id` to 0 in the BPF_END case
to break the scalar tie, similar to how BPF_NEG handles it via
`__mark_reg_known`.
📍 영향받는 시스템
BPF 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 BPF 프로그램을 로드하여 검증기의 경계 값 추적 오류를 유도하고 메모리 범위를 초과하는 접근 수행
🛡️ 대응 방법
BPF_END 연산 시 dst_reg->id를 0으로 초기화하는 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 보안 패치 버전인지 배포판 보안 공지를 통해 확인