Vulnerability · Published May 29, 2024 · Assigned by Linux

CVE-2023-52881tcp: do not accept ACK of bytes we never sent

Critical 9.8

In plain English

A critical-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 49% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)0.6%top 50.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: tcp: do not accept ACK of bytes we never sent This patch is based on a detailed report and ideas from Yepeng Pan and Christian Rossow. ACK seq validation is currently following RFC 5961 5.2 guidelines: The ACK value is considered acceptable only if it is in the range of ((SND.UNA - MAX.SND.WND) <= SEG.ACK <= SND.NXT). All incoming segments whose ACK value doesn't satisfy the above condition MUST be discarded and an ACK sent back. It needs to be noted that RFC 793 on page 72 (fifth check) says: "If the ACK is a duplicate (SEG.ACK < SND.UNA), it can be ignored. If the ACK acknowledges something not yet sent (SEG.ACK > SND.NXT) then send an ACK, drop the segment, and return". The "ignored" above implies that the processing of the incoming data segment continues, which means the ACK value is treated as acceptable. This mitigation makes the ACK check more stringent since any ACK < SND.UNA wouldn't be accepted, instead only ACKs that are in the range ((SND.UNA - MAX.SND.WND) <= SEG.ACK <= SND.NXT) get through. This can be refined for new (and possibly spoofed) flows, by not accepting ACK for bytes that were never sent. This greatly improves TCP security at a little cost. I added a Fixes: tag to make sure this patch will reach stable trees, even if the 'blamed' patch was adhering to the RFC. tp->bytes_acked was added in linux-4.2 Following packetdrill test (courtesy of Yepeng Pan) shows the issue at hand: 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1024) = 0 // ---------------- Handshake ------------------- // // when window scale is set to 14 the window size can be extended to // 65535 * (2^14) = 1073725440. Linux would accept an ACK packet // with ack number in (Server_ISN+1-1073725440. Server_ISN+1) // ,though this ack number acknowledges some data never // sent by the server. +0 < S 0:0(0) win 65535 <mss 1400,nop,wscale 14> +0 > S. 0:0(0) ack 1 <...> +0 < . 1:1(0) ack 1 win 65535 +0 accept(3, ..., ...) = 4 // For the established connection, we send an ACK packet, // the ack packet uses ack number 1 - 1073725300 + 2^32, // where 2^32 is used to wrap around. // Note: we used 1073725300 instead of 1073725440 to avoid possible // edge cases. // 1 - 1073725300 + 2^32 = 3221241997 // Oops, old kernels happily accept this packet. +0 < . 1:1001(1000) ack 3221241997 win 65535 // After the kernel fix the following will be replaced by a challenge ACK, // and prior malicious frame would be dropped. +0 > . 1:1(0) ack 1001

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8bpftool4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-abi-stablelists4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-core4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-cross-headers4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-debug4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-debug-core4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-debug-devel4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-debug-modules4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-debug-modules-extra4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-devel4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-doc4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-headers4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-modules4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-modules-extra4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-rt4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-core4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-debug4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-debug-core4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-debug-devel4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-debug-kvm4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-debug-modules4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-debug-modules-extra4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-devel4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-kvm4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-modules4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-rt-modules-extra4.18.0-553.8.1.rt7.349.el8_10ALSA-2024:4352
AlmaLinux:8kernel-tools4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-tools-libs4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-tools-libs-devel4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-zfcpdump4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-zfcpdump-core4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-zfcpdump-devel4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-zfcpdump-modules4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8kernel-zfcpdump-modules-extra4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8perf4.18.0-553.8.1.el8_10ALSA-2024:4211
AlmaLinux:8python3-perf4.18.0-553.8.1.el8_10ALSA-2024:4211
Debian:12linux6.1.69-1DEBIAN-CVE-2023-52881
Debian:13linux6.6.8-1DEBIAN-CVE-2023-52881
Debian:14linux6.6.8-1DEBIAN-CVE-2023-52881
Rocky Linux:8kernel0:4.18.0-553.8.1.el8_10RLSA-2024:4211
Rocky Linux:8kernel-rt0:4.18.0-553.8.1.rt7.349.el8_10RLSA-2024:4352
Ubuntu:22.04:LTSlinux5.15.0-100.110UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-aws5.15.0-1056.61UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-azure5.15.0-1058.66UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1058.66.1UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-gcp5.15.0-1053.61UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-gke5.15.0-1052.57UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1038.44UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-ibm5.15.0-1048.51UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1050.56UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-kvm5.15.0-1052.57UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-100.110UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1046.46UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1014.14UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1025.25UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1012.12UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-oracle5.15.0-1053.59UBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-raspi5.15.0-1048.51UBUNTU-CVE-2023-52881
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2023-52881
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2023-52881

Affected products (as reported)

VendorProductVersions
Linux Linux 354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before 69eae75ca5255e876628ac5cee9eaab31f644b57354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before 458f07ffeccd17f99942311e09ef574ddf4a414a354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before 7ffff0cc929fdfc62a74b384c4903d6496c910f0354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before b17a886ed29f3b70b78ccf632dad03e0c69e3c1a354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before 0d4e0afdd6658cd21dd5be61880411a2553fd1fc354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before 008b807fe487e0b15a3a6c39add4eb477f73e440354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before 2087d53a66e97a5eb5d1bf558d5bef9e5f891757354e4aa391ed50a4d827ff6fc11e0667d0859b25 – before 3d501dd326fb1c73f1b8206d4c6e1d7b15c07e27
Linux Linux 3.8

References