CVE-2026-99449: usb: gadget: fix refcount underflow in gadgetfs_bind() error path

Published Nov 19, 2026
·
Updated

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

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

gadgetfsbind() calls getdev() only on the success path, but gadgetfsunbind() called from the enomem error label unconditionally calls putdev(). When bind fails (e.g. ENOMEM), putdev() fires without a matching getdev(), leaving the refcount unbalanced.

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

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

Affected Software

3 affected componentsFixes available
linux/kernel<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.61
6.18.61
linux/kernel>=6.19.0<7.3.2
7.3.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.61
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.2
  4. Compensating control

    Call get_dev() at the start of gadgetfs_bind(), before any error path can call put_dev(), so the reference is balanced whether bind succeeds or fails.

Event History

Nov 19, 2026
CVE Published
via MITRE·02:41 PM
Data Sourced
via MITRE·02:41 PM
Description
Data Sourced
via OSV·02:41 PM
DescriptionAffected Software
Data Sourced
via NVD·03:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203