🇰🇷 한글 설명
Linux 커널의 RISC-V 포트에서 uprobes를 위한 XOL 버퍼 구축 후 fence.i 명령어가 누락된 취약점이 발견되었습니다. 이로 인해 명령어 캐시가 적절히 플러시되지 않아 오래되거나 손상된 명령어가 잘못 실행될 수 있습니다.
💡 쉬운 설명
컴퓨터가 새로운 명령어를 실행하기 전에 기존 메모리 내용을 정리해야 하는데, 이 과정이 빠져서 엉뚱한 명령을 실행할 위험이 있습니다. 이 문제는 주로 RISC-V 아키텍처를 사용하는 시스템에서 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
riscv: uprobes: Add missing fence.i after building the XOL buffer
The XOL (execute out-of-line) buffer is used to single-step the
replaced instruction(s) for uprobes. The RISC-V port was missing a
proper fence.i (i$ flushing) after constructing the XOL buffer, which
can result in incorrect execution of stale/broken instructions.
This was found running the BPF selftests "test_progs:
uprobe_autoattach, attach_probe" on the Spacemit K1/X60, where the
uprobes tests randomly blew up.
📍 영향받는 시스템
RISC-V 아키텍처를 사용하는 Linux 커널 시스템 (특히 Spacemit K1/X60 등)
⚔️ 공격 벡터
로컬 공격자가 uprobes를 사용하여 특정 프로세스의 실행 흐름을 조작하거나 잘못된 명령어를 실행하도록 유도할 수 있음
🛡️ 대응 방법
XOL 버퍼 구축 후 fence.i 명령어가 포함된 최신 Linux 커널 패치 적용
🔧 검증 코드
출력 결과에 riscv가 포함되어 있는지 확인하여 해당 아키텍처 사용 여부를 판단합니다.