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

usb: gadget: fix refcount underflow in gadgetfs_bind() error path

gadgetfs_bind() calls get_dev() only on the success path, but
gadgetfs_unbind() called from the enomem error label unconditionally
calls put_dev(). When bind fails (e.g. ENOMEM), put_dev() fires
without a matching get_dev(), leaving the refcount unbalanced.

A subsequent close of the ep0 file descriptor calls dev_release() ->
put_dev() which hits zero and frees the object; then gadgetfs_kill_sb()
calls put_dev(the_device) again on the already-freed pointer, triggering
a refcount underflow and use-after-free.

Fix by calling get_dev() at the start of gadgetfs_bind(), before any
error path that invokes gadgetfs_unbind(), so the reference is always
balanced regardless of whether bind succeeds or fails.

Project Subscriptions

Vendors Products
Linux Kernel Subscribe
Advisories
Source ID Title
Debian DLA Debian DLA DLA-4927-1 linux-6.12 security update
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Mon, 23 Nov 2026 08:15:00 +0000


Fri, 20 Nov 2026 13:45:00 +0000

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux

Fri, 20 Nov 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-911
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.1, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Thu, 19 Nov 2026 15:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: fix refcount underflow in gadgetfs_bind() error path gadgetfs_bind() calls get_dev() only on the success path, but gadgetfs_unbind() called from the enomem error label unconditionally calls put_dev(). When bind fails (e.g. ENOMEM), put_dev() fires without a matching get_dev(), leaving the refcount unbalanced. A subsequent close of the ep0 file descriptor calls dev_release() -> put_dev() which hits zero and frees the object; then gadgetfs_kill_sb() calls put_dev(the_device) again on the already-freed pointer, triggering a refcount underflow and use-after-free. Fix by calling get_dev() at the start of gadgetfs_bind(), before any error path that invokes gadgetfs_unbind(), so the reference is always balanced regardless of whether bind succeeds or fails.
Title usb: gadget: fix refcount underflow in gadgetfs_bind() error path
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-11-23T08:02:57.756Z

Reserved: 2026-09-25T10:25:14.415Z

Link: CVE-2026-99449

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-19T15:17:58.693

Modified: 2026-11-23T08:17:48.757

Link: CVE-2026-99449

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-11-19T14:41:39Z

Links: CVE-2026-99449 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-11-21T17:00:13Z

Weaknesses