🇰🇷 한글 설명
Linux 커널의 BPF 서브프로그램에서 ld_{abs,ind} 명령어를 사용할 때, 패킷 데이터 로드 실패 시 발생하는 비정상 종료 경로에 대한 검증 로직이 누락되었습니다. 이로 인해 검증기(Verifier)가 모든 실행 경로를 정확히 시뮬레이션하지 못해 보안 취약점이 발생할 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 핵심 기능 중 하나인 BPF 프로그램이 데이터를 읽다가 실패했을 때, 이를 처리하는 과정에서 보안 검사를 제대로 하지 못하는 결함이 발견되었습니다. 공격자가 이를 악용하면 시스템의 보안 규칙을 우회할 가능성이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix ld_{abs,ind} failure path analysis in subprogs
Usage of ld_{abs,ind} instructions got extended into subprogs some time
ago via commit 09b28d76eac4 ("bpf: Add abnormal return checks."). These
are only allowed in subprograms when the latter are BTF annotated and
have scalar return types.
The code generator in bpf_gen_ld_abs() has an abnormal exit path (r0=0 +
exit) from legacy cBPF times. While the enforcement is on scalar return
types, the verifier must also simulate the path of abnormal exit if the
packet data load via ld_{abs,ind} failed.
This is currently not the case. Fix it by having the verifier simulate
both success and failure paths, and extend it in similar ways as we do
for tail calls. The success path (r0=unknown, continue to next insn) is
pushed onto stack for later validation and the r0=0 and return to the
caller is done on the fall-through side.
📍 영향받는 시스템
ld_{abs,ind} 명령어를 사용하는 BTF 주석이 달린 서브프로그램을 포함한 Linux Kernel
⚔️ 공격 벡터
조작된 BPF 프로그램을 로드하여 검증기의 경로 분석 오류를 유도하는 방식
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 버전인지 배포판 보안 공지를 통해 확인