CVE-2024-46706
Severity:
Pending analysis
Type:
Unavailable / Other
Publication date:
13/09/2024
Last modified:
13/09/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
tty: serial: fsl_lpuart: mark last busy before uart_add_one_port<br />
<br />
With "earlycon initcall_debug=1 loglevel=8" in bootargs, kernel<br />
sometimes boot hang. It is because normal console still is not ready,<br />
but runtime suspend is called, so early console putchar will hang<br />
in waiting TRDE set in UARTSTAT.<br />
<br />
The lpuart driver has auto suspend delay set to 3000ms, but during<br />
uart_add_one_port, a child device serial ctrl will added and probed with<br />
its pm runtime enabled(see serial_ctrl.c).<br />
The runtime suspend call path is:<br />
device_add<br />
|-> bus_probe_device<br />
|->device_initial_probe<br />
|->__device_attach<br />
|-> pm_runtime_get_sync(dev->parent);<br />
|-> pm_request_idle(dev);<br />
|-> pm_runtime_put(dev->parent);<br />
<br />
So in the end, before normal console ready, the lpuart get runtime<br />
suspended. And earlycon putchar will hang.<br />
<br />
To address the issue, mark last busy just after pm_runtime_enable,<br />
three seconds is long enough to switch from bootconsole to normal<br />
console.