CVE-2021-4442 json
tcp: add sanity tests to TCP_QUEUE_SEQ
published 2024-08-29 2 y ago modified 2026-06-17 4 mo ago also EUVD-2021-34641
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
tcp: add sanity tests to TCP_QUEUE_SEQ
Qingyu Li reported a syzkaller bug where the repro changes RCV SEQ _after_ restoring data in the receive queue.
mprotect(0x4aa000, 12288, PROT_READ) = 0 mmap(0x1ffff000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ffff000 mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 mmap(0x21000000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x21000000 socket(AF_INET6, SOCK_STREAM, IPPROTO_IP) = 3 setsockopt(3, SOL_TCP, TCP_REPAIR, [1], 4) = 0 connect(3, {sa_family=AF_INET6, sin6_port=htons(0), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_scope_id=0}, 28) = 0 setsockopt(3, SOL_TCP, TCP_REPAIR_QUEUE, [1], 4) = 0 sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="0x0000000000000003\0\0", iov_len=20}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 20 setsockopt(3, SOL_TCP, TCP_REPAIR, [0], 4) = 0 setsockopt(3, SOL_TCP, TCP_QUEUE_SEQ, [128], 4) = 0 recvfrom(3, NULL, 20, 0, NULL, NULL) = -1 ECONNRESET (Connection reset by peer)
syslog shows: [ 111.205099] TCP recvmsg seq # bug 2: copied 80, seq 0, rcvnxt 80, fl 0 [ 111.207894] WARNING: CPU: 1 PID: 356 at net/ipv4/tcp.c:2343 tcp_recvmsg_locked+0x90e/0x29a0
This should not be allowed. TCP_QUEUE_SEQ should only be used when queues are empty.
This patch fixes this case, and the tx path as well.
Patch / fix
- Linux Linux 4.19.181, 5.4.106, 5.10.24, 5.11.7, 5.12
- linux Debian 14, Debian 13, Debian 12 5.10.24-1
debian advisories DEBIAN-CVE-2021-4442
- linux Ubuntu 18.04 LTS 4.15.0-144.148
- linux Ubuntu 20.04 LTS 5.4.0-73.82
- linux-aws Ubuntu 18.04 LTS 4.15.0-1103.110
- linux-aws Ubuntu 20.04 LTS 5.4.0-1048.50
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1043.46
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1092.94
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1039.40
- linux-azure Ubuntu 20.04 LTS 5.4.0-1047.49
ubuntu advisories UBUNTU-CVE-2021-4442
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-348.el8
- perf RHEL 8 4.18.0-348.el8
- bpftool RHEL 8 4.18.0-348.el8
- kernel-core RHEL 8 4.18.0-348.el8
- kernel-tools RHEL 8 4.18.0-348.el8
- python3-perf RHEL 8 4.18.0-348.el8
- kernel-modules RHEL 8 4.18.0-348.el8
- kernel-zfcpdump RHEL 8 4.18.0-348.el8
red hat advisories RHSA-2021:4356
- kernel-rt SLE Real Time 12 SP5 4.12.14-10.203.1
- kernel-syms-rt SLE Real Time 12 SP5 4.12.14-10.203.1
- kernel-rt_debug SLE Real Time 12 SP5 4.12.14-10.203.1
- kernel-source-rt SLE Real Time 12 SP5 4.12.14-10.203.1
suse advisories SUSE-SU-2024:3566-1
- git.kernel.org/stable/c/319f460237fc2965a80aa9a055044e1da7b3692a commit
- git.kernel.org/stable/c/3bf899438c123c444f6b644a57784dfbb6b15ad6 commit
- git.kernel.org/stable/c/046f3c1c2ff450fb7ae53650e9a95e0074a61f3e commit
- git.kernel.org/stable/c/3b72d5a703842f582502d97906f17d6ee122dac2 commit
- git.kernel.org/stable/c/8811f4a9836e31c14ecdf79d9f3cb7c5d463265d 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-4442 updated cvss 5.5
kernel: tcp: add sanity tests to TCP_QUEUE_SEQ
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more 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 8 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +6 moreaffected: no fix available
-
Red Hat CodeReady Linux Builder (v. 8) kernel-debuginfo-common-x86_64 4.18.0-348.el8, kernel-debuginfo-common-aarch64 4.18.0-348.el8, kernel-debuginfo-common-ppc64le 4.18.0-348.el8 Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-348.el8, kernel 4.18.0-348.el8, bpftool 4.18.0-348.el8, kernel-core 4.18.0-348.el8, kernel-tools 4.18.0-348.el8, python3-perf 4.18.0-348.el8, +15 morefixed: vendor fix RHSA-2021:4356
-
Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 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.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- git.kernel.org https://git.kernel.org/stable/c/319f460237fc2965a80aa9a055044e1da7b3692a referenced PoC, tagged "exploit" by a source, unverified
- git.kernel.org https://git.kernel.org/stable/c/3bf899438c123c444f6b644a57784dfbb6b15ad6 referenced PoC, tagged "exploit" by a source, unverified
- git.kernel.org https://git.kernel.org/stable/c/046f3c1c2ff450fb7ae53650e9a95e0074a61f3e referenced PoC, tagged "exploit" by a source, unverified
- git.kernel.org https://git.kernel.org/stable/c/3b72d5a703842f582502d97906f17d6ee122dac2 referenced PoC, tagged "exploit" by a source, unverified
- git.kernel.org https://git.kernel.org/stable/c/8811f4a9836e31c14ecdf79d9f3cb7c5d463265d referenced PoC, tagged "exploit" by a source, unverified
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
- Technology feeds
References
-
git.kernel.org
/stable/c/319f460237fc2965a80aa9a055044e1da7b3692a
exploit, patch
-
git.kernel.org
/stable/c/3bf899438c123c444f6b644a57784dfbb6b15ad6
exploit, patch
-
git.kernel.org
/stable/c/046f3c1c2ff450fb7ae53650e9a95e0074a61f3e
exploit, patch
-
git.kernel.org
/stable/c/3b72d5a703842f582502d97906f17d6ee122dac2
exploit, patch
-
git.kernel.org
/stable/c/8811f4a9836e31c14ecdf79d9f3cb7c5d463265d
exploit, patch
Sources
- CVE List CVE-2021-4442
- NVD CVE-2021-4442
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.