🔍 CVE-2023-52920

7.8
CVSS Score
HIGH
2024-11-05
2026-10-15 22:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 BPF 검증기(verifier)에서 스택을 통한 레지스터 스필/필(spill/fill) 동작을 정밀하게 추적하지 못하던 취약점이 해결되었습니다. 이 패치는 명령어 이력을 사용하여 스택 슬롯 인덱스와 프레임 번호를 기록함으로써 정밀한 백트래킹 로직의 한계를 제거합니다.

💡 쉬운 설명

리눅스 운영체제의 핵심 기능 중 하나인 BPF 프로그램이 메모리를 사용하는 방식을 검사할 때, 계산 오류가 발생할 수 있는 허점을 수정한 것입니다. 이를 통해 해커가 검사기를 속여 시스템 권한을 탈취하는 것을 방지합니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: bpf: support non-r10 register spill/fill to/from stack in precision tracking Use instruction (jump) history to record instructions that performed register spill/fill to/from stack, regardless if this was done through read-only r10 register, or any other register after copying r10 into it *and* potentially adjusting offset. To make this work reliably, we push extra per-instruction flags into instruction history, encoding stack slot index (spi) and stack frame number in extra 10 bit flags we take away from prev_idx in instruction history. We don't touch idx field for maximum performance, as it's checked most frequently during backtracking. This change removes basically the last remaining practical limitation of precision backtracking logic in BPF verifier. It fixes known deficiencies, but also opens up new opportunities to reduce number of verified states, explored in the subsequent patches. There are only three differences in selftests' BPF object files according to veristat, all in the positive direction (less states). File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) -------------------------------------- ------------- --------- --------- ------------- ---------- ---------- ------------- test_cls_redirect_dynptr.bpf.linked3.o cls_redirect 2987 2864 -123 (-4.12%) 240 231 -9 (-3.75%) xdp_synproxy_kern.bpf.linked3.o syncookie_tc 82848 82661 -187 (-0.23%) 5107 5073 -34 (-0.67%) xdp_synproxy_kern.bpf.linked3.o syncookie_xdp 85116 84964 -152 (-0.18%) 5162 5130 -32 (-0.62%) Note, I avoided renaming jmp_history to more generic insn_hist to minimize number of lines changed and potential merge conflicts between bpf and bpf-next trees. Notice also cur_hist_entry pointer reset to NULL at the beginning of instruction verification loop. This pointer avoids the problem of relying on last jump history entry's insn_idx to determine whether we already have entry for current instruction or not. It can happen that we added jump history entry because current instruction is_jmp_point(), but also we need to add instruction flags for stack access. In this case, we don't want to entries, so we need to reuse last added entry, if it is present. Relying on insn_idx comparison has the same ambiguity problem as the one that was fixed recently in [0], so we avoid that. [0] https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

📍 영향받는 시스템

Linux Kernel (BPF verifier를 사용하는 모든 버전)

⚔️ 공격 벡터

조작된 BPF 프로그램을 로드하여 커널 검증기의 정밀도 추적 오류를 악용함으로써 커널 메모리 오염 또는 권한 상승 시도

🛡️ 대응 방법

최신 보안 패치가 적용된 Linux 커널 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 최신 패치 버전인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel