CVE-2024-46706 tty: serial: fsl_lpuart: mark last busy before uart_add_one_port
A race condition in the fsl_lpuart driver can cause a kernel boot hang when specific debug boot arguments are used, preventing system startup.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-46706?
CVE-2024-46706 is a medium-severity denial of service vulnerability in Linux kernel, published on 13 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
tty: serial: fsl_lpuart: mark last busy before uart_add_one_port
With "earlycon initcall_debug=1 loglevel=8" in bootargs, kernel sometimes boot hang. It is because normal console still is not ready, but runtime suspend is called, so early console putchar will hang in waiting TRDE set in UARTSTAT.
The lpuart driver has auto suspend delay set to 3000ms, but during uart_add_one_port, a child device serial ctrl will added and probed with its pm runtime enabled(see serial_ctrl.c). The runtime suspend call path is: device_add |-> bus_probe_device |->device_initial_probe |->__device_attach |-> pm_runtime_get_sync(dev->parent); |-> pm_request_idle(dev); |-> pm_runtime_put(dev->parent);
So in the end, before normal console ready, the lpuart get runtime suspended. And earlycon putchar will hang.
To address the issue, mark last busy just after pm_runtime_enable, three seconds is long enough to switch from bootconsole to normal console.
Which versions are affected by CVE-2024-46706?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-46706?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-46706 being exploited?
There is no known exploitation of CVE-2024-46706 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-46706, DEBIAN-CVE-2024-46706, GHSA-gggx-8wfw-w6jx, UBUNTU-CVE-2024-46706.