🇰🇷 한글 설명
Linux 커널의 eBPF 검증 단계에서 스택 접근 크기가 signed int를 초과하여 음수로 표현될 때 정수 오버플로우 취약점이 발생합니다. 이로 인해 check_stack_range_initialized() 함수에서 경계를 벗어난 배열 접근이 가능하여 커널 메모리 정보 유출이나 권한 상승으로 이어질 수 있습니다. 이 패치는 이전에 실수로 제거된 오버플로우 보호 메커니즘을 다시 추가합니다.
💡 쉬운 설명
Linux 커널의 BPF 프로그램 검증 시스템에서 메모리 접근 크기 계산이 잘못되면 커널 메모리에 부정당하게 접근할 수 있는 문제입니다. 특정 BPF 프로그램을 로드할 때 이 취약점을 악용하면 권한 상승이 가능합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Protect against int overflow for stack access size
This patch re-introduces protection against the size of access to stack
memory being negative; the access size can appear negative as a result
of overflowing its signed int representation. This should not actually
happen, as there are other protections along the way, but we should
protect against it anyway. One code path was missing such protections
(fixed in the previous patch in the series), causing out-of-bounds array
accesses in check_stack_range_initialized(). This patch causes the
verification of a program with such a non-sensical access size to fail.
This check used to exist in a more indirect way, but was inadvertendly
removed in a833a17aeac7.
📍 영향받는 시스템
Linux kernel 5.8 ~ 현재 버전 (배포판별로 상이, 특히 BPF를 활성화한 커널)
⚔️ 공격 벡터
악의적인 eBPF 프로그램 로드를 통해 정수 오버플로우를 트리거하여 커널 검증 단계에서 메모리 접근 제어 우회
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하여 패치 적용 또는 특권이 없는 BPF 로드 제한 (unprivileged_bpf_disabled=1)
🔧 검증 코드
커널 버전이 5.8~6.4 범위면 취약성 확인 필요, 6.5 이상이면 패치 가능성 높음 (배포판 백포트 여부 확인 필요)
uname -r | grep -E '^(5\.(8|1[0-9])|6\.[0-4])' && echo 'Potentially vulnerable' || echo 'Check kernel version'