CVE-2025-68289: usb: gadget: f_eem: Fix memory leak in eem_unwrap
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: feem: Fix memory leak in eemunwrap
The existing code did not handle the failure case of usbepqueue in the command path, potentially leading to memory leaks.
Improve error handling to free all allocated resources on usbepqueue failure. This patch continues to use goto logic for error handling, as the existing error handling is complex and not easily adaptable to auto-cleanup helpers.
kmemleak results: unreferenced object 0xffffff895a512300 (size 240): backtrace: slabpostallochook+0xbc/0x3a4 kmemcachealloc+0x1b4/0x358 skbclone+0x90/0xd8 eemunwrap+0x1cc/0x36c unreferenced object 0xffffff8a157f4000 (size 256): backtrace: slabpostallochook+0xbc/0x3a4 kmemcacheallocnode+0x1b4/0x2dc kmalloctrace+0x48/0x140 dwc3gadgetepallocrequest+0x58/0x11c usbepallocrequest+0x40/0xe4 eemunwrap+0x204/0x36c unreferenced object 0xffffff8aadbaac00 (size 128): backtrace: slabpostallochook+0xbc/0x3a4 kmemcacheallocnode+0x1b4/0x2dc kmalloc+0x64/0x1a8 eemunwrap+0x218/0x36c unreferenced object 0xffffff89ccef3500 (size 64): backtrace: slabpostallochook+0xbc/0x3a4 kmemcacheallocnode+0x1b4/0x2dc kmalloctrace+0x48/0x140 eemunwrap+0x238/0x36c
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68289?
CVE-2025-68289 has a moderate severity level due to its potential for memory leaks in the Linux kernel.
How do I fix CVE-2025-68289?
To fix CVE-2025-68289, ensure that you update to the patched version of the Linux kernel where the memory leak issue is resolved.
What causes the vulnerability CVE-2025-68289?
CVE-2025-68289 is caused by improper error handling in the usb_ep_queue function, which can lead to memory leaks.
What versions of the Linux kernel are affected by CVE-2025-68289?
CVE-2025-68289 affects certain versions of the Linux kernel prior to the fix being applied in the latest kernel updates.
Are there any workarounds for CVE-2025-68289 before applying a patch?
There are no recommended workarounds for CVE-2025-68289; the best approach is to apply the necessary kernel updates.