🇰🇷 한글 설명
Linux 커널의 OpenRISC 아키텍처에서 or1k_atomic 시스템 호출 시 사용자 포인터에 대한 유효성 검사가 누락되어 발생한 취약점입니다. 공격자가 커널 주소를 인자로 전달할 경우 커널 메모리에 임의로 읽기 및 쓰기가 가능해져 권한 상승 및 코드 실행이 가능합니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(커널)가 사용자가 보낸 주소가 안전한지 확인하지 않고 데이터를 읽고 쓰는 오류가 발견되었습니다. 이를 통해 해커가 시스템의 가장 깊숙한 권한을 탈취하여 컴퓨터를 마음대로 조종할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
openrisc: fix arbitrary kernel memory access via or1k_atomic syscall
sys_or1k_atomic() (syscall 244 in the "or1k" ABI) takes two user
pointers, v1 and v2, and swaps the words they point to in hand-written
assembly.
l.lwz r29,0(r4)
l.lwz r27,0(r5)
l.sw 0(r4),r27
l.sw 0(r5),r29
The pointers are not checked with access_ok(). The four memory
accesses also have no exception table entries.
A caller passes a kernel address as either pointer, and the syscall
reads from and writes to it directly.
This gives an unprivileged process a kernel read/write primitive. It
overwrites kernel data such as the sys_call_table, gaining code
execution in kernel context.
Check both pointers before entering the critical section. Add fixups
for the four memory accesses so faults on valid but unmapped user
addresses return -EFAULT.
[
[email protected]: fix comment style]
📍 영향받는 시스템
OpenRISC 아키텍처를 사용하는 Linux 커널
⚔️ 공격 벡터
권한이 없는 사용자가 or1k_atomic 시스템 호출에 커널 메모리 주소를 인자로 전달하여 공격
🛡️ 대응 방법
시스템 호출 진입 전 포인터에 대한 access_ok() 검사를 수행하고 예외 처리 테이블(fixups)을 추가한 최신 커널로 업데이트
🔧 검증 코드
출력 결과에 openrisc가 포함되어 있다면 해당 아키텍처를 사용하는 시스템이며, 커널 버전을 확인하여 패치 여부를 판단해야 합니다.
uname -a | grep -i 'openrisc'