Vulnerability record
usb: gadget: u_serial: pin ports while TTYs are installed
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: u_serial: pin ports while TTYs are installed
A slab-use-after-free can occur when gserial_free_line() frees struct gs_port while it is still reachable through an installed TTY. The port->port.count value tracks successful opens, but it is zero before gs_open() and again after gs_close(), before TTY cleanup has finished. Teardown can therefore free gs_port while tty_init_dev() or release_tty() still accesses its tty_port.
Manage gs_port lifetime with tty_port references. Take a reference in gs_install(), drop…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources