Description
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.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < a9c0ffe5930c97b352f32febfc59a6e6ae6772eeaffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 802e2192a9d38027730c2869c67c9131b8c8fe9faffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < ddf51d74ee9f9857c99477329d80408cedebda61affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 06b376432974fe5f25f2843a8e8438c6a1cf3d50affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 61a2fb25551be0375bc16ef2a70c987dfca26183affected
Linux Linux
Default version status: affected
2.6.12affected0 to < 2.6.12unaffected6.6.160 to ≤ 6.6.*unaffected6.12.114 to ≤ 6.12.*unaffected6.18.57 to ≤ 6.18.*unaffected7.2.6 to ≤ 7.2.*unaffected7.3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/a9c0ffe5930c97b352f32febfc59a6e6ae6772ee ↗
- https://git.kernel.org/stable/c/802e2192a9d38027730c2869c67c9131b8c8fe9f ↗
- https://git.kernel.org/stable/c/ddf51d74ee9f9857c99477329d80408cedebda61 ↗
- https://git.kernel.org/stable/c/06b376432974fe5f25f2843a8e8438c6a1cf3d50 ↗
- https://git.kernel.org/stable/c/61a2fb25551be0375bc16ef2a70c987dfca26183 ↗