xhci: dbgtty: Fix unregister on tty_register_driver() failure
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.15.220, 6.1.187, 6.6.156, 6.12.108, 6.18.49, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: xhci: dbgtty: Fix unregister on tty_register_driver() failure If tty_register_driver() fails, it drops the reference, but fails to set the global dbc_tty_driver to NULL, causing the unregister to be called again when module exits. On module unload dbc_tty_exit() only gates its cleanup on the driver pointer being non-NULL, so it operates on the already-freed driver: module_init(xhci_hcd_init) xhci_hcd_init() xhci_dbc_init() [return value ignored] dbc_tty_init() tty_register_driver() fails tty_driver_kref_put() -> driver freed (dbc_tty_driver left dangling) ... module_exit(xhci_hcd_fini) xhci_hcd_fini() xhci_dbc_exit() dbc_tty_exit() if (dbc_tty_driver) -> true (dangling) tty_unregister_driver() -> use-after-free
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in 01b7bc0938061f2fd46e0094f6483d8c6c02f7d3; From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in 43635ff6401ca0e0ed21875379eeded921321525; From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in eaca2814f32b9872a332326324b9e83e01f156d2; From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in 943f976c93e70563b132f5585ff68b08c89641a2; From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in 0d0faf3cc44c4d86fc6faf5cea972c0fbe00b922; From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in 33ed35ca629477f57e0dd1d77d6df96cf5a9eb55; From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in 0e469b94fbba8eb03666da41dd1082b793c50c1a; From 4521f16139409cdf9462c7325d43454462cff6c3 · fixed in a916fa66a43e10f63198b6ce978badffc678821a
- Linux Linux
5.9
- KernelLinux
From 5.9.0 · fixed in 5.15.220; From 5.16.0 · fixed in 6.1.187; From 6.2.0 · fixed in 6.6.156; From 6.7.0 · fixed in 6.12.108; From 6.13.0 · fixed in 6.18.49; From 6.19.0 · fixed in 7.1.13; From 7.2.0 · fixed in 7.2.3
References 8
git.kernel.org
- stable/c/01b7bc0938061f2fd46e0094f6483d8c6c02f7d3
- stable/c/43635ff6401ca0e0ed21875379eeded921321525
- stable/c/eaca2814f32b9872a332326324b9e83e01f156d2
- stable/c/943f976c93e70563b132f5585ff68b08c89641a2
- stable/c/0d0faf3cc44c4d86fc6faf5cea972c0fbe00b922
- stable/c/33ed35ca629477f57e0dd1d77d6df96cf5a9eb55
- stable/c/0e469b94fbba8eb03666da41dd1082b793c50c1a
- stable/c/a916fa66a43e10f63198b6ce978badffc678821a