CVE-2021-47527
MediumIn 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")).
CVSS 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-401CVE-2021-47527 is a Memory Leak vulnerability
What is Memory Leak?
The product does not release memory after use, causing gradual resource exhaustion. Learn more on MITRE CWE
Affected versions
Linux kernel versions
4.9
and later are affected. Fixed in
4.9.292,
4.14.257,
4.19.220,
5.4.164,
5.10.84,
5.15.7,
5.16
and their respective stable series.
References
7 total-
Patch
-
Patch
-
Patch
-
Patch
-
Patch
Frequently asked questions
-
What is CVE-2021-47527?
CVE-2021-47527 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as a Memory Leak flaw (CWE-401) . It affects Linux kernel versions from 4.9 onward and has been patched in 4.9.292, 4.14.257, 4.19.220 and others. CVE-2021-47527 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2021-47527?
CVE-2021-47527 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2021-47527?
Yes. CVE-2021-47527 has been patched. Fixed versions include 4.9.292, 4.14.257, 4.19.220 and others. If you are running Linux kernel 4.9 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2021-47527 actively exploited?
No. CVE-2021-47527 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.