io_uring/query: cap user size passed to copy_struct_to_user
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 2b8ad4981ecedb14c1fdd811ab977010b23933e6, Kernel 417e02f7b6051765b91cf1289071882eebd172e0 and Kernel ba77efee1b95b4ad7559b1cdbe7cd7fa36dca95b.
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.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | =6.18, >=c265ae75f900cea4e415230a77b5d152377627dd <2b8ad4981ecedb14c1fdd811ab977010b23933e6, >=c265ae75f900cea4e415230a77b5d152377627dd <417e02f7b6051765b91cf1289071882eebd172e0, >=c265ae75f900cea4e415230a77b5d152377627dd <ba77efee1b95b4ad7559b1cdbe7cd7fa36dca95b | 2b8ad4981ecedb14c1fdd811ab977010b23933e6, 417e02f7b6051765b91cf1289071882eebd172e0, ba77efee1b95b4ad7559b1cdbe7cd7fa36dca95b |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket