{"id":"CVE-2026-99449","aliases":["CVE-2026-99449"],"related":[],"kind":"vulnerability","state":"published","title":"usb: gadget: fix refcount underflow in gadgetfs_bind() error path","summary":"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() ->\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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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() ->\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.","source":"cvelist"}],"published":"2026-11-19T14:41:39.468Z","modified":"2026-11-23T08:17:48.757Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"09e4c7127b4663317c54f37b29722843dc0d93aa","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"260b0c0ab0b75b358b0b22988ea9a93b5c40c593","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"48373c3c210e7d797993953ae6d619dfc9e7df54","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"5370f6139485ee3801a83ab32b4b881b97cead46","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"a28791bdb256abd0f338a9b32a95392907d1c987","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"e7e89759445e97ccb445758c6c8d5caed4eb42f9","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"adb693d0369cd7f08f9424588fdd1f613c22d43b","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"cb3b441f2698455a48e9a023d5f7f4e3fcb94c73","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.12","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.61","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.2","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/09e4c7127b4663317c54f37b29722843dc0d93aa","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/260b0c0ab0b75b358b0b22988ea9a93b5c40c593","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/48373c3c210e7d797993953ae6d619dfc9e7df54","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5370f6139485ee3801a83ab32b4b881b97cead46","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a28791bdb256abd0f338a9b32a95392907d1c987","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e7e89759445e97ccb445758c6c8d5caed4eb42f9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/adb693d0369cd7f08f9424588fdd1f613c22d43b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cb3b441f2698455a48e9a023d5f7f4e3fcb94c73","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99449","url":"https://www.cve.org/CVERecord?id=CVE-2026-99449","licence":"CVE Terms of Use","modified":"2026-11-23T08:02:57.756Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99449","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99449","licence":"Public domain","modified":"2026-11-23T08:17:48.757Z"}],"updatedAt":"2026-11-25T22:59:52.074Z","epss":{"score":0.0022,"percentile":0.13412,"date":"2026-12-02T12:00:21.000Z"}}