🇰🇷 한글 설명
LoongArch 아키텍처의 리눅스 커널 BPF JIT 컴파일러가 BPF_PROBE_MEM* 명령어로부터의 복구 가능한 메모리 접근 오류(ADEM 예외)를 처리하지 못하는 취약점입니다. do_ade() 함수가 EX_TYPE_BPF 예외 고정 루틴을 호출하지 않아 BPF 프로그램의 안전한 실행이 보장되지 않습니다.
💡 쉬운 설명
Linux 커널의 BPF 기능이 메모리 접근 오류를 제대로 처리하지 못해 커널 충돌 또는 정보 유출이 발생할 수 있습니다. 커널 업데이트를 통해 오류 처리 메커니즘을 수정하면 해결됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: Enable exception fixup for specific ADE subcode
This patch allows the LoongArch BPF JIT to handle recoverable memory
access errors generated by BPF_PROBE_MEM* instructions.
When a BPF program performs memory access operations, the instructions
it executes may trigger ADEM exceptions. The kernel’s built-in BPF
exception table mechanism (EX_TYPE_BPF) will generate corresponding
exception fixup entries in the JIT compilation phase; however, the
architecture-specific trap handling function needs to proactively call
the common fixup routine to achieve exception recovery.
do_ade(): fix EX_TYPE_BPF memory access exceptions for BPF programs,
ensure safe execution.
Relevant test cases: illegal address access tests in module_attach and
subprogs_extable of selftests/bpf.
📍 영향받는 시스템
LoongArch 아키텍처 Linux 커널 4.20 이상 (BPF JIT 활성화된 버전)
⚔️ 공격 벡터
로컬 공격자가 악의적인 BPF 프로그램을 로드하여 메모리 접근 예외를 발생시켜 권한 상승 또는 DoS 야기
🛡️ 대응 방법
Linux 커널 업데이트 (LoongArch BPF JIT 예외 고정 패치 적용)
🔧 검증 코드
LoongArch 시스템에서 BPF_JIT가 활성화되어 있으면 CONFIG_BPF_JIT=y가 출력되며, 이 경우 커널 패치 적용 여부를 업스트림 릴리스 노트로 확인하세요.
uname -m | grep loongarch && cat /boot/config-$(uname -r) 2>/dev/null | grep -E '^CONFIG_BPF_JIT=y'