🇰🇷 한글 설명
Linux 커널의 io_uring/query 인터페이스에서 copy_struct_to_user 호출 시 사용자 지정 크기 제한이 제대로 이루어지지 않는 취약점입니다. 공격자가 매우 큰 크기를 요청할 경우 커널이 메모리의 대량의 영역을 0으로 초기화(zeroing)하게 만들어 시스템 자원을 고갈시킬 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(커널)가 사용자의 잘못된 요청을 제대로 검사하지 않아, 시스템의 메모리를 과도하게 청소하게 만드는 버그입니다. 이로 인해 컴퓨터가 느려지거나 멈추는 현상이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
io_uring/query: cap user size passed to copy_struct_to_user
io_handle_query_entry() clamps hdr.size for the inbound copy_from_user()
but keeps the original user value as usize. copy_struct_to_user() uses
that usize and, when it is larger than the kernel result, clear_user()s
the trailing bytes.
As hdr.size is a __u32, a query can request nearly 4 GiB of zeroing,
including on the error path where res_size stays 0. The interface is
reachable without a ring via IORING_REGISTER_QUERY.
Reject sizes larger than PAGE_SIZE, as recommended for copy_struct_*
interfaces.
📍 영향받는 시스템
io_uring 인터페이스를 사용하는 Linux 커널 버전 (IORING_REGISTER_QUERY 지원 버전)
⚔️ 공격 벡터
로컬 공격자가 IORING_REGISTER_QUERY를 통해 매우 큰 크기의 데이터를 요청하여 커널의 메모리 초기화 자원을 소모함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 query 요청 크기 제한을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 이후의 버전인지 확인하십시오.