CVE-2021-47527
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
24/05/2024
Last modified:
24/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
serial: core: fix transmit-buffer reset and memleak<br />
<br />
Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use<br />
tty_port_close") converted serial core to use tty_port_close() but<br />
failed to notice that the transmit buffer still needs to be freed on<br />
final close.<br />
<br />
Not freeing the transmit buffer means that the buffer is no longer<br />
cleared on next open so that any ioctl() waiting for the buffer to drain<br />
might wait indefinitely (e.g. on termios changes) or that stale data can<br />
end up being transmitted in case tx is restarted.<br />
<br />
Furthermore, the buffer of any port that has been opened would leak on<br />
driver unbind.<br />
<br />
Note that the port lock is held when clearing the buffer pointer due to<br />
the ldisc race worked around by commit a5ba1d95e46e ("uart: fix race<br />
between uart_put_char() and uart_shutdown()").<br />
<br />
Also note that the tty-port shutdown() callback is not called for<br />
console ports so it is not strictly necessary to free the buffer page<br />
after releasing the lock (cf. d72402145ace ("tty/serial: do not free<br />
trasnmit buffer page under port lock")).
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.9 (including) | 4.9.292 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.10 (including) | 4.14.257 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.15 (including) | 4.19.220 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.164 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.84 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.7 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
- https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206
- https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db
- https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12
- https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf
- https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f
- https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e
- https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
- https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206
- https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db
- https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12
- https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf
- https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f
- https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e



