CVE-2021-47185: tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc
In the Linux kernel, the following vulnerability has been resolved:
tty: ttybuffer: Fix the softlockup issue in flushtoldisc
The Linux kernel CVE team has assigned CVE-2021-47185 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024041033-CVE-2021-47185-c363@gregkh/T
Other sources
In the Linux kernel, the following vulnerability has been resolved:
tty: ttybuffer: Fix the softlockup issue in flushtoldisc
When running ltp testcase(ltp/testcases/kernel/pty/pty04.c) with arm64, there is a soft lockup, which look like this one:
Workqueue: eventsunbound flushtoldisc Call trace: dumpbacktrace+0x0/0x1ec showstack+0x24/0x30 dumpstack+0xd0/0x128 panic+0x15c/0x374 watchdogtimerfn+0x2b8/0x304 runhrtimer+0x88/0x2c0 hrtimerrunqueues+0xa4/0x120 hrtimerinterrupt+0xfc/0x270 archtimerhandlerphys+0x40/0x50 handlepercpudevidirq+0x94/0x220 handledomainirq+0x88/0xf0 gichandleirq+0x84/0xfc el1irq+0xc8/0x180 slipunesc+0x80/0x214 [slip] ttyldiscreceivebuf+0x64/0x80 ttyportdefaultreceivebuf+0x50/0x90 flushtoldisc+0xbc/0x110 processonework+0x1d4/0x4b0 workerthread+0x180/0x430 kthread+0x11c/0x120
In the testcase pty04, The first process call the write syscall to send data to the pty master. At the same time, the workqueue will do the flushtoldisc to pop data in a loop until there is no more data left. When the sender and workqueue running in different core, the sender sends data fastly in full time which will result in workqueue doing work in loop for a long time and occuring softlockup in flushtoldisc with kernel configured without preempt. So I add needresched check and condresched in the flushtoldisc loop to avoid it.
— NVD
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2021-47185?
CVE-2021-47185 has been classified as a moderate severity vulnerability in the Linux kernel.
How do I fix CVE-2021-47185?
To address CVE-2021-47185, update your kernel to one of the fixed versions: 4.4.293, 4.9.291, 4.14.256, 4.19.218, 5.4.162, 5.10.82, 5.15.5, or 5.16.
What systems are affected by CVE-2021-47185?
CVE-2021-47185 affects specific versions of the Linux kernel running on various systems.
Is CVE-2021-47185 exploitable remotely?
CVE-2021-47185 does not appear to be directly exploitable remotely and requires local access.
When was CVE-2021-47185 announced?
CVE-2021-47185 was announced as a resolved issue in the Linux kernel by the CVE team.