usb: gadget: fix refcount underflow in gadgetfs_bind() error path (Linux Linux)
En bref
- Source
- NVD
- EPSS
- EPSS 0.22 % · centile 13 ()
- État
- PUBLISHED
- Publiée
- Mise à jour
- Attribuée par
- Linux
- Produits affectés
- Linux · Linux
- Statut NVD
- Received
Rechercher sur…
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.
Références
- https://git.kernel.org/stable/c/09e4c7127b4663317c54f37b29722843dc0d93aa
- https://git.kernel.org/stable/c/260b0c0ab0b75b358b0b22988ea9a93b5c40c593
- https://git.kernel.org/stable/c/48373c3c210e7d797993953ae6d619dfc9e7df54
- https://git.kernel.org/stable/c/5370f6139485ee3801a83ab32b4b881b97cead46
- https://git.kernel.org/stable/c/a28791bdb256abd0f338a9b32a95392907d1c987
- https://git.kernel.org/stable/c/e7e89759445e97ccb445758c6c8d5caed4eb42f9
- https://git.kernel.org/stable/c/adb693d0369cd7f08f9424588fdd1f613c22d43b
- https://git.kernel.org/stable/c/cb3b441f2698455a48e9a023d5f7f4e3fcb94c73
Références européennes
- ENISA EUVD · EUVD-2026-130115
- GCVE · GCVE-0-2026-99449
Avis du CERT-FR
- CERTFR-2026-AVI-1676 — Multiples vulnérabilités dans le noyau Linux de SUSE · cert.ssi.gouv.fr
- CERTFR-2026-AVI-1639 — Multiples vulnérabilités dans le noyau Linux de Debian LTS · cert.ssi.gouv.fr
Produits affectés
| Produit | Versions affectées |
|---|---|
| Linux · Linux | affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 09e4c7127b4663317c54f37b29722843dc0d93aa affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 260b0c0ab0b75b358b0b22988ea9a93b5c40c593 affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 48373c3c210e7d797993953ae6d619dfc9e7df54 affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 5370f6139485ee3801a83ab32b4b881b97cead46 affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < a28791bdb256abd0f338a9b32a95392907d1c987 affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < e7e89759445e97ccb445758c6c8d5caed4eb42f9 affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < adb693d0369cd7f08f9424588fdd1f613c22d43b affectée : ≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < cb3b441f2698455a48e9a023d5f7f4e3fcb94c73 Autres versions : non affectée |
| Linux · Linux | affectée : 2.6.12 non affectée : ≥ 0 < 2.6.12 non affectée : ≥ 5.10.275 ≤ 5.10.* non affectée : ≥ 5.15.226 ≤ 5.15.* non affectée : ≥ 6.1.193 ≤ 6.1.* non affectée : ≥ 6.6.163 ≤ 6.6.* non affectée : ≥ 6.12.117 ≤ 6.12.* non affectée : ≥ 6.18.61 ≤ 6.18.* non affectée : ≥ 7.3.2 ≤ 7.3.* non affectée : ≥ 7.4-rc1 ≤ * Autres versions : affectée |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |