CVE-2026-138892: USB: gadgetfs: do not WARN about excessively large memory allocations
In the Linux kernel, the following vulnerability has been resolved:
USB: gadgetfs: do not WARN about excessively large memory allocations
GadgetFS passes an excessively large user input len to kmalloc and kmalloc gives a WARN (see below for details). Suppress it by passing GFPNOWARN to kmalloc used by both epwriteiter() and epreaditer(). Follow the same method as commit 4f2629ea67e72 ("USB: usbfs: Don't WARN about excessively large memory allocations").
kmalloc is used to allocate physically contiguous memory for kernel allocations. For requests larger than KMALLOCMAXCACHESIZE, kmalloc uses the page allocator and can only support up to KMALLOCMAXSIZE. For request sizes bigger than KMALLOCMAXSIZE, the page allocator can emit a WARN because kmalloc allocates an order greater than MAXPAGEORDER.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Pass __GFP_NOWARN to the kmalloc calls used by GadgetFS ep_write_iter() and ep_read_iter() to suppress warnings for excessively large allocations.