🇰🇷 한글 설명
Linux 커널의 BPF(Berkeley Packet Filter) 검증기에서 스택 경계 확인 시 32비트 정수 오버플로우가 발생할 수 있는 취약점입니다. 기존에는 산술 연산이 32비트 영역에서 수행되어 특정 조건에서 경계 검사를 우회할 수 있었으나, 이를 64비트 영역으로 확장하여 해결했습니다.
💡 쉬운 설명
컴퓨터가 메모리 범위를 확인할 때 숫자가 너무 커져서 계산 오류가 발생하는 문제입니다. 이 오류를 이용하면 공격자가 허용되지 않은 메모리 영역에 접근할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Guard stack limits against 32bit overflow
This patch promotes the arithmetic around checking stack bounds to be
done in the 64-bit domain, instead of the current 32bit. The arithmetic
implies adding together a 64-bit register with a int offset. The
register was checked to be below 1<<29 when it was variable, but not
when it was fixed. The offset either comes from an instruction (in which
case it is 16 bit), from another register (in which case the caller
checked it to be below 1<<29 [1]), or from the size of an argument to a
kfunc (in which case it can be a u32 [2]). Between the register being
inconsistently checked to be below 1<<29, and the offset being up to an
u32, it appears that we were open to overflowing the `int`s which were
currently used for arithmetic.
[1] https://github.com/torvalds/linux/blob/815fb87b753055df2d9e50f6cd80eb10235fe3e9/kernel/bpf/verifier.c#L7494-L7498
[2] https://github.com/torvalds/linux/blob/815fb87b753055df2d9e50f6cd80eb10235fe3e9/kernel/bpf/verifier.c#L11904
📍 영향받는 시스템
BPF 기능을 사용하는 Linux 커널 (패치 적용 전 버전)
⚔️ 공격 벡터
조작된 BPF 프로그램을 로드하여 커널의 스택 경계 검사 로직을 우회하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인하십시오.