CVE-2021-47527 json
serial: core: fix transmit-buffer reset and memleak
published 2024-05-24 2 y ago modified 2026-06-17 4 mo ago also EUVD-2021-33907
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 16%
- public exploits
- 0
- none known
Summary
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")).
Patch / fix
- Linux Linux 4.9.292, 4.14.257, 4.19.220, 5.4.164, 5.10.84, 5.15.7, 5.16
- linux Debian 14, Debian 13, Debian 12 5.15.15-1
debian advisories DEBIAN-CVE-2021-47527
- linux Ubuntu 18.04 LTS 4.15.0-169.177
- linux Ubuntu 20.04 LTS 5.4.0-100.113
- linux-aws Ubuntu 18.04 LTS 4.15.0-1121.129
- linux-aws Ubuntu 20.04 LTS 5.4.0-1066.69
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1065.69
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1015.16
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1107.109
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1056.58
ubuntu advisories UBUNTU-CVE-2021-47527
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 8 4.18.0-553.22.1.el8_10
- perf RHEL 8 4.18.0-553.22.1.el8_10
- bpftool RHEL 8 4.18.0-553.22.1.el8_10
- kernel-core RHEL 8 4.18.0-553.22.1.el8_10
- kernel-tools RHEL 8 4.18.0-553.22.1.el8_10
- python3-perf RHEL 8 4.18.0-553.22.1.el8_10
- kernel-modules RHEL 8 4.18.0-553.22.1.el8_10
- kernel-zfcpdump RHEL 8 4.18.0-553.22.1.el8_10
red hat advisories RHSA-2025:13135RHSA-2024:7000RHSA-2024:7001
- kernel AlmaLinux 8 4.18.0-553.22.1.el8_10
- perf AlmaLinux 8 4.18.0-553.22.1.el8_10
- bpftool AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-core AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-tools AlmaLinux 8 4.18.0-553.22.1.el8_10
- python3-perf AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-modules AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-zfcpdump AlmaLinux 8 4.18.0-553.22.1.el8_10
almalinux advisories ALSA-2024:7000ALSA-2024:7001
- kernel Rocky Linux 8 4.18.0-553.22.1.el8_10
- kernel-rt Rocky Linux 8 4.18.0-553.22.1.rt7.363.el8_10
rocky linux advisories RLSA-2024:7000RLSA-2024:7001
- git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206 commit
- git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e commit
- git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db commit
- git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf commit
- git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f commit
- git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12 commit
- git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-47527 updated cvss 5.5
kernel: serial: core: fix transmit-buffer reset and memleak
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +82 moreaffected: no fix available
-
Red Hat CodeReady Linux Builder EUS (v.9.4) libperf 5.14.0-427.81.1.el9_4, kernel-debuginfo-common-s390x 5.14.0-427.81.1.el9_4, kernel-debuginfo-common-x86_64 5.14.0-427.81.1.el9_4, kernel-debuginfo-common-aarch64 5.14.0-427.81.1.el9_4, kernel-debuginfo-common-ppc64le 5.14.0-427.81.1.el9_4 Red Hat Enterprise Linux AppStream EUS (v.9.4) rv 5.14.0-427.81.1.el9_4, perf 5.14.0-427.81.1.el9_4, rtla 5.14.0-427.81.1.el9_4, kernel-devel-matched 5.14.0-427.81.1.el9_4, kernel-64k-devel-matched 5.14.0-427.81.1.el9_4, kernel-debug-devel-matched 5.14.0-427.81.1.el9_4, +6 morefixed: vendor fix RHSA-2025:13135
-
Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-553.22.1.el8_10, kernel 4.18.0-553.22.1.el8_10, bpftool 4.18.0-553.22.1.el8_10, kernel-core 4.18.0-553.22.1.el8_10, kernel-tools 4.18.0-553.22.1.el8_10, python3-perf 4.18.0-553.22.1.el8_10, +15 morefixed: vendor fix RHSA-2024:7000
-
Red Hat Enterprise Linux BaseOS EUS (v.9.4) bpftool 7.3.0-427.81.1.el9_4, kernel 5.14.0-427.81.1.el9_4, kernel-64k 5.14.0-427.81.1.el9_4, kernel-core 5.14.0-427.81.1.el9_4, kernel-tools 5.14.0-427.81.1.el9_4, python3-perf 5.14.0-427.81.1.el9_4, +28 morefixed: vendor fix RHSA-2025:13135
-
Red Hat Enterprise Linux CRB (v. 8) kernel-debuginfo-common-x86_64 4.18.0-553.22.1.el8_10, kernel-debuginfo-common-aarch64 4.18.0-553.22.1.el8_10, kernel-debuginfo-common-ppc64le 4.18.0-553.22.1.el8_10fixed: vendor fix RHSA-2024:7000
-
Red Hat Enterprise Linux NFV (v. 8) kernel-rt 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-kvm 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-core 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-modules 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-kvm 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-core 4.18.0-553.22.1.rt7.363.el8_10, +4 morefixed: vendor fix RHSA-2024:7001
-
Red Hat Enterprise Linux Real Time EUS (v.9.4) kernel-rt 5.14.0-427.81.1.el9_4, kernel-rt-core 5.14.0-427.81.1.el9_4, kernel-rt-modules 5.14.0-427.81.1.el9_4, kernel-rt-debug-core 5.14.0-427.81.1.el9_4, kernel-rt-modules-core 5.14.0-427.81.1.el9_4, kernel-rt-debug-modules 5.14.0-427.81.1.el9_4, +4 more Red Hat Enterprise Linux Real Time for NFV EUS (v.9.4) kernel-rt 5.14.0-427.81.1.el9_4, kernel-rt-kvm 5.14.0-427.81.1.el9_4, kernel-rt-core 5.14.0-427.81.1.el9_4, kernel-rt-modules 5.14.0-427.81.1.el9_4, kernel-rt-debug-kvm 5.14.0-427.81.1.el9_4, kernel-rt-debug-core 5.14.0-427.81.1.el9_4, +6 morefixed: vendor fix RHSA-2025:13135
show 3 moreshow fewer
-
Red Hat Enterprise Linux RT (v. 8) kernel-rt 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-core 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-modules 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-core 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-modules 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-modules-extra 4.18.0-553.22.1.rt7.363.el8_10, +2 morefixed: vendor fix RHSA-2024:7001
-
Red Hat OpenShift AI 8 rhoai/odh-rhel8-operator v2.13.1-2, rhoai/odh-dashboard-rhel8 v2.13.1-1, rhoai/odh-modelmesh-rhel8 v2.13.1-1, rhoai/odh-operator-bundle v2.13.1-2, rhoai/odh-rhel8-operator v2.14.0-24, rhoai/odh-dashboard-rhel8 v2.14.0-11, +56 morefixed: vendor fix RHBA-2024:8413
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.25% chance of exploitation in the next 30 days, higher than 16% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-401 Missing Release of Memory after Effective Lifetime
- Technology feeds
References
-
git.kernel.org
/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206
patch
-
git.kernel.org
/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e
patch
-
git.kernel.org
/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db
patch
-
git.kernel.org
/stable/c/c5da8aa441053958594f94254592bb41264bdfbf
patch
-
git.kernel.org
/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f
patch
-
git.kernel.org
/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12
patch
-
git.kernel.org
/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
patch
Sources
- CVE List CVE-2021-47527
- NVD CVE-2021-47527
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.