CVE-2026-43343: usb: gadget: f_subset: Fix unbalanced refcnt in geth_free
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_subset: Fix unbalanced refcnt in geth_free
geth_alloc() increments the reference count, but geth_free() fails to decrement it. This prevents the configuration of attributes via configfs after unlinking the function.
Decrement the reference count in geth_free() to ensure proper cleanup.
The Linux kernel CVE team has assigned CVE-2026-43343 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 5.10.253 with commit a932b171554714b1bca313b853c7aa9f2930f9aa Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 5.15.203 with commit d7d702407b61e96286a15b6e715572f541a8d41c Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 6.1.168 with commit 3f5bfc550a40d7493b1cf09540ed6b412b3b82be Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 6.6.134 with commit 75776a055b656873319c3830fed471daef3ceb23 Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 6.12.81 with commit cc8ec610cd14c093a19371691a7ce1ee5421e829 Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 6.18.22 with commit 3d436670b47415da042452618fb5d8e317ab095f Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 6.19.12 with commit 23e4851ce348a329d974e84e828155dda9f52122 Issue introduced in 3.11 with commit 02832e56f88a981474ee4c7c141f46fc1b4454f4 and fixed in 7.0 with commit caa27923aacd8a5869207842f2ab1657c6c0c7bc
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-43343
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/function/f_subset.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/a932b171554714b1bca313b853c7aa9f2930f9aa https://git.kernel.org/stable/c/d7d702407b61e96286a15b6e715572f541a8d41c https://git.kernel.org/stable/c/3f5bfc550a40d7493b1cf09540ed6b412b3b82be https://git.kernel.org/stable/c/75776a055b656873319c3830fed471daef3ceb23 https://git.kernel.org/stable/c/cc8ec610cd14c093a19371691a7ce1ee5421e829 https://git.kernel.org/stable/c/3d436670b47415da042452618fb5d8e317ab095f https://git.kernel.org/stable/c/23e4851ce348a329d974e84e828155dda9f52122 https://git.kernel.org/stable/c/caa27923aacd8a5869207842f2ab1657c6c0c7bc