🇰🇷 한글 설명
IORING_SETUP_SQE_MIXED 사용 시 io_uring 커널의 SQE 경계 검사에서 논리적 위치 대신 물리적 인덱스를 검증하지 않는 버그. 권한 없는 사용자가 sq_array를 조작하여 128바이트 SQE를 마지막 슬롯에 배치하면 배열 끝 64바이트를 초과 읽을 수 있음.
💡 쉬운 설명
Linux 커널의 입출력 최적화 기능(io_uring)에서 메모리 범위 확인 오류로 인해 권한 없는 사용자가 허용된 메모리 영역을 벗어나 읽을 수 있습니다. 이를 통해 민감한 정보 유출이나 시스템 불안정이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
io_uring: fix physical SQE bounds check for SQE_MIXED 128-byte ops
When IORING_SETUP_SQE_MIXED is used without IORING_SETUP_NO_SQARRAY,
the boundary check for 128-byte SQE operations in io_init_req()
validated the logical SQ head position rather than the physical SQE
index.
The existing check:
!(ctx->cached_sq_head & (ctx->sq_entries - 1))
ensures the logical position isn't at the end of the ring, which is
correct for NO_SQARRAY rings where physical == logical. However, when
sq_array is present, an unprivileged user can remap any logical
position to an arbitrary physical index via sq_array. Setting
sq_array[N] = sq_entries - 1 places a 128-byte operation at the last
physical SQE slot, causing the 128-byte memcpy in
io_uring_cmd_sqe_copy() to read 64 bytes past the end of the SQE
array.
Replace the cached_sq_head alignment check with a direct validation
of the physical SQE index, which correctly handles both sq_array and
NO_SQARRAY cases.
📍 영향받는 시스템
IORING_SETUP_SQE_MIXED 옵션을 지원하는 Linux 커널 (5.19 이상의 대부분 배포판)
⚔️ 공격 벡터
권한 없는 로컬 사용자가 io_uring의 sq_array를 리매핑하여 SQE 배열 경계를 우회하고 메모리 초과 읽기 수행
🛡️ 대응 방법
커널을 최신 패치 버전으로 업그레이드하거나 IORING_SETUP_SQE_MIXED 사용을 제한
🔧 검증 코드
CONFIG_IO_URING=y가 활성화되어 있고 커널 버전이 패치되었는지 확인. 취약한 버전이면 커널 업데이트 필요
grep -i 'CONFIG_IO_URING' /boot/config-$(uname -r) 2>/dev/null && uname -r