UBUNTU-CVE-2026-90337: Use After Free
In the Linux kernel, the following vulnerability has been resolved: serial: core: do fallible allocations before the console can be registered serialcoreaddoneport() allocates uport->ttygroups after uartconfigureport(), which may register the console. If the allocation fails, the driver unwinds the port while its console remains registered. The earlier uport->name allocation has a related failure path that leaves state->uartport linked to a port being freed. Failslab reproduced a NULL dereference in PL011 console output and a KASAN use-after-free in i.MX console output after failed binds. Allocate the name and ttygroups before linking the port and configuring it. Reserve space for the optional driver attribute group because configport() may populate uport->attrgroup during configuration.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Move the fallible allocations for uport->name and uport->tty_groups before uart_configure_port() and before the port is linked; reserve space for the optional driver attribute group because config_port() may populate uport->attr_group, and ensure failed allocations unwind without leaving state->uart_port linked to a freed port.
Linux kernel serial core serial_core_add_one_port() allocation order = Allocate uport->name, uport->tty_groups, and reserved space for the optional driver attribute group before linking the port, configuring it, or registering its console