GHSA-85R3-HW54-VMP5
Vulnerability from github – Published: 2026-11-19 15:31 – Updated: 2026-11-19 15:31In 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.
{
"affected": [],
"aliases": [
"CVE-2026-99449"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-19T15:17:58Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: fix refcount underflow in gadgetfs_bind() error path\n\ngadgetfs_bind() calls get_dev() only on the success path, but\ngadgetfs_unbind() called from the enomem error label unconditionally\ncalls put_dev(). When bind fails (e.g. ENOMEM), put_dev() fires\nwithout a matching get_dev(), leaving the refcount unbalanced.\n\nA subsequent close of the ep0 file descriptor calls dev_release() -\u003e\nput_dev() which hits zero and frees the object; then gadgetfs_kill_sb()\ncalls put_dev(the_device) again on the already-freed pointer, triggering\na refcount underflow and use-after-free.\n\nFix by calling get_dev() at the start of gadgetfs_bind(), before any\nerror path that invokes gadgetfs_unbind(), so the reference is always\nbalanced regardless of whether bind succeeds or fails.",
"id": "GHSA-85r3-hw54-vmp5",
"modified": "2026-11-19T15:31:24Z",
"published": "2026-11-19T15:31:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99449"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a28791bdb256abd0f338a9b32a95392907d1c987"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/adb693d0369cd7f08f9424588fdd1f613c22d43b"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/cb3b441f2698455a48e9a023d5f7f4e3fcb94c73"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/e7e89759445e97ccb445758c6c8d5caed4eb42f9"
}
],
"schema_version": "1.4.0",
"severity": []
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.