serial: core: clear freed pointers on uart_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 6.6.160, 6.12.114, 6.18.57, 7.2.6
- 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: serial: core: clear freed pointers on uart_register_driver() failure uart_register_driver() leaves drv->state pointing to freed memory when tty_alloc_driver() fails. If tty_register_driver() fails, drv->tty_driver also retains a pointer after its reference is dropped. Drivers that use drv->state as an "already registered" flag can then skip registration on the next probe and pass the freed state to uart_add_one_port(). This issue was found with failslab on QEMU's raspi1ap board by failing registration and binding the PL011 port again. Clear both pointers on their failure paths, as uart_unregister_driver() already does.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in a9c0ffe5930c97b352f32febfc59a6e6ae6772ee; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 802e2192a9d38027730c2869c67c9131b8c8fe9f; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in ddf51d74ee9f9857c99477329d80408cedebda61; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 06b376432974fe5f25f2843a8e8438c6a1cf3d50; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 61a2fb25551be0375bc16ef2a70c987dfca26183
- Linux Linux
2.6.12
- KernelLinux
From 2.6.12 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.114; From 6.13.0 · fixed in 6.18.57; From 6.19.0 · fixed in 7.2.6