CVE-2021-47527
Last modified
CVE-2021-47527 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: serial: core: fix transmit-buffer reset and memleak Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close") converted serial core to use tty_port_close() but failed to notice that the transmit buffer still needs to be freed on final close. Not freeing the transmit buffer means that the buffer is no longer cleared on next open so that any ioctl() waiting for the buffer to drain might wait indefinitely (e.g. on termios changes) or that stale data can end up being transmitted in case tx is restarted. Furthermore, the buffer of any port that has been opened would leak on driver unbind. Note that the port lock is held when clearing the buffer pointer due to the ldisc race worked around by commit a5ba1d95e46e ("uart: fix race between uart_put_char() and uart_shutdown()"). Also note that the tty-port shutdown() callback is not called for console ports so it is not strictly necessary to free the buffer page after releasing the lock (cf. EPSS estimates a 0.25% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: serial: core: fix transmit-buffer reset and memleak Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close") converted serial core to use tty_port_close() but failed to notice that the transmit buffer still needs to be freed on final close. Not freeing the transmit buffer means that the buffer is no longer cleared on next open so that any ioctl() waiting for the buffer to drain might wait indefinitely (e.g. on termios changes) or that stale data can end up being transmitted in case tx is restarted. Furthermore, the buffer of any port that has been opened would leak on driver unbind. Note that the port lock is held when clearing the buffer pointer due to the ldisc race worked around by commit a5ba1d95e46e ("uart: fix race between uart_put_char() and uart_shutdown()"). Also note that the tty-port shutdown() callback is not called for console ports so it is not strictly necessary to free the buffer page after releasing the lock (cf. d72402145ace ("tty/serial: do not free trasnmit buffer page under port lock")).
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 4.9, < 4.9.292 | — |
| Linux | Linux Kernel | >= 4.10, < 4.14.257 | — |
| Linux | Linux Kernel | >= 4.15, < 4.19.220 | — |
| Linux | Linux Kernel | >= 4.20, < 5.4.164 | — |
| Linux | Linux Kernel | >= 5.5, < 5.10.84 | — |
| Linux | Linux Kernel | >= 5.11, < 5.15.7 | — |
| Linux | Linux Kernel | 5.16 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2021-47527?
How severe is CVE-2021-47527?
How do I fix CVE-2021-47527?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2021
- CVE-2021-47521In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2021-47522In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47523In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47524In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47525In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2021-47526In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47528In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47529In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47530In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47531In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47532In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-47533In the Linux kernel, the following vulnerability has been re…7.8
Are you affected by CVE-2021-47527?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
