CVE-2021-47185: tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc

Published Apr 10, 2024
·
Updated

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

19 affected componentsFixes available
redhat/kernel<4.4.293
4.4.293
redhat/kernel<4.9.291
4.9.291
redhat/kernel<4.14.256
4.14.256
redhat/kernel<4.19.218
4.19.218
redhat/kernel<5.4.162
5.4.162
redhat/kernel<5.10.82
5.10.82
redhat/kernel<5.15.5
5.15.5
redhat/kernel<5.16
5.16
Linux Linux kernel<4.4.293
Linux Linux kernel>=4.5<4.9.291
Linux Linux kernel>=4.10<4.14.256
Linux Linux kernel>=4.15<4.19.218
Linux Linux kernel>=4.20<5.4.162
Linux Linux kernel>=5.5<5.10.82
Linux Linux kernel>=5.11<5.15.5
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2

Event History

Apr 10, 2024
CVE Published
via MITRE·06:56 PM
Data Sourced
via MITRE·06:56 PM
Description
Apr 11, 2024
Data Sourced
via Red Hat·09:16 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2021-47185?

CVE-2021-47185 has been classified as a moderate severity vulnerability in the Linux kernel.

2

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.

3

What systems are affected by CVE-2021-47185?

CVE-2021-47185 affects specific versions of the Linux kernel running on various systems.

4

Is CVE-2021-47185 exploitable remotely?

CVE-2021-47185 does not appear to be directly exploitable remotely and requires local access.

5

When was CVE-2021-47185 announced?

CVE-2021-47185 was announced as a resolved issue in the Linux kernel by the CVE team.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203