🇰🇷 한글 설명
리눅스 커널의 BPF 검증기에서 ALU 연산 시 오프셋 값을 검사하는 과정에 결함이 발견되었습니다. 기존 검증 로직이 음수 오프셋을 제대로 차단하지 못해, 잘못된 BPF 프로그램이 허용될 수 있는 취약점입니다.
💡 쉬운 설명
컴퓨터가 계산을 할 때 숫자의 위치를 지정하는 값에 '마이너스'가 들어오면 안 되는데, 이를 제대로 확인하지 못하는 오류입니다. 이를 통해 공격자가 시스템의 보안 규칙을 우회할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject negative offsets for ALU ops
When verifying BPF programs, the check_alu_op() function validates
instructions with ALU operations. The 'offset' field in these
instructions is a signed 16-bit integer.
The existing check 'insn->off > 1' was intended to ensure the offset is
either 0, or 1 for BPF_MOD/BPF_DIV. However, because 'insn->off' is
signed, this check incorrectly accepts all negative values (e.g., -1).
This commit tightens the validation by changing the condition to
'(insn->off != 0 && insn->off != 1)'. This ensures that any value
other than the explicitly permitted 0 and 1 is rejected, hardening the
verifier against malformed BPF programs.
📍 영향받는 시스템
BPF(Berkeley Packet Filter)를 사용하는 리눅스 커널 버전
⚔️ 공격 벡터
조작된 음수 오프셋을 포함한 악성 BPF 프로그램을 로드하여 커널 검증기를 우회
🛡️ 대응 방법
ALU 연산 오프셋 검증 로직이 수정된 최신 리눅스 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인