Skip to contentSkip to conversation

CVE-2026-93141: usb: gadget: r8a66597: avoid double free of ep0_req in probe error path

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: r8a66597: avoid double free of ep0_req in probe error path

If usb_add_gadget_udc() fails, r8a66597_probe() jumps to err_add_udc and frees ep0_req, then falls through to clean_up2 where ep0_req is freed again when it is non-NULL.

Remove the redundant free from err_add_udc and keep the cleanup in clean_up2 so the request is released exactly once.

Issue found using a prototype static analysis tool and confirmed by code review.

The Linux kernel CVE team has assigned CVE-2026-93141 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 5.10.270 with commit c9e93290ffe7db22a8131a5f5fd026335090fbbe
	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 5.15.221 with commit 7721cf32efa428bd9649f4a9b89fc85601df87de
	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 6.1.188 with commit f9c43246128a2dd0f2bbad71decf153910ce3606
	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 6.6.157 with commit 150d3f3c461345b6c9ae784912cf1e49c8e5ff6b
	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 6.12.110 with commit b2e68583c7c51eea2aafb8f1793e0d285c56ac82
	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 6.18.52 with commit 6648c470918371766f6d368113dd2a4faebac93f
	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 7.2.6 with commit 6be64cca6527f7fc99b05abf54f22db91bbc116f
	Issue introduced in 3.17 with commit 776976a67ae25d18be42794fd783a50757402cbe and fixed in 7.3-rc1 with commit 41d541e3718db01668a4cd29815ee4b3b55f76d2

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-93141

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	drivers/usb/gadget/udc/r8a66597-udc.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/c9e93290ffe7db22a8131a5f5fd026335090fbbe
	https://git.kernel.org/stable/c/7721cf32efa428bd9649f4a9b89fc85601df87de
	https://git.kernel.org/stable/c/f9c43246128a2dd0f2bbad71decf153910ce3606
	https://git.kernel.org/stable/c/150d3f3c461345b6c9ae784912cf1e49c8e5ff6b
	https://git.kernel.org/stable/c/b2e68583c7c51eea2aafb8f1793e0d285c56ac82
	https://git.kernel.org/stable/c/6648c470918371766f6d368113dd2a4faebac93f
	https://git.kernel.org/stable/c/6be64cca6527f7fc99b05abf54f22db91bbc116f
	https://git.kernel.org/stable/c/41d541e3718db01668a4cd29815ee4b3b55f76d2