🇰🇷 한글 설명
Linux kernel io_uring 모듈의 validate_fixed_range() 함수가 길이 0인 fixed buffer import를 허용하여, io_import_fixed()에서 범위를 벗어난 메모리(bvec 배열)에 접근하는 취약점입니다. KASAN이 slab-out-of-bounds read를 감지하며, 로컬 권한 상승으로 이어질 수 있습니다.
💡 쉬운 설명
Linux 커널의 I/O 처리 부분(io_uring)에서 특수하게 구성된 메모리 요청을 보낼 때 안전 검사를 우회하여 허용되지 않은 메모리에 접근할 수 있습니다. 로컬 공격자가 이를 악용해 시스템 권한을 상승시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
io_uring/rsrc: reject zero-length fixed buffer import
validate_fixed_range() admits buf_addr at the exact end of the
registered region when len is zero, because the check uses strict
greater-than (buf_end > imu->ubuf + imu->len). io_import_fixed()
then computes offset == imu->len, which causes the bvec skip logic
to advance past the last bio_vec entry and read bv_offset from
out-of-bounds slab memory.
Return early from io_import_fixed() when len is zero. A zero-length
import has no data to transfer and should not walk the bvec array
at all.
BUG: KASAN: slab-out-of-bounds in io_import_reg_buf+0x697/0x7f0
Read of size 4 at addr ffff888002bcc254 by task poc/103
Call Trace:
io_import_reg_buf+0x697/0x7f0
io_write_fixed+0xd9/0x250
__io_issue_sqe+0xad/0x710
io_issue_sqe+0x7d/0x1100
io_submit_sqes+0x86a/0x23c0
__do_sys_io_uring_enter+0xa98/0x1590
Allocated by task 103:
The buggy address is located 12 bytes to the right of
allocated 584-byte region [ffff888002bcc000, ffff888002bcc248)
📍 영향받는 시스템
Linux kernel 모든 버전의 io_uring 모듈 (5.1+), 특히 fix 패치가 적용되지 않은 버전
⚔️ 공격 벡터
로컬 공격자가 io_uring_enter() 시스템 콜을 통해 길이 0인 fixed buffer를 등록하면 메모리 검증 로직을 우회해 out-of-bounds 메모리 읽기 트리거
🛡️ 대응 방법
Linux kernel을 io_import_fixed()에서 len==0 체크가 추가된 최신 버전으로 업데이트 (해당 fix가 포함된 커널 버전 이상 설치)
🔧 검증 코드
출력된 kernel 버전이 해당 CVE fix가 포함된 버전 이상인지 확인 (공식 Linux kernel 보안 권고사항의 영향받는 버전 목록과 비교)
uname -r | awk -F. '{print $1 "." $2}' && cat /proc/version | grep -oP 'Linux version \K[^ ]+'