tcp: do not accept ACK of bytes we never sent

Summary

CVECVE-2023-52881
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-05-29 11:16:02 UTC
Updated2026-08-04 10:18:47 UTC
DescriptionIn 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

Risk And Classification

Primary CVSS: v3.1 5.5 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Problem Types: NVD-CWE-noinfo


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary5.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
3.1416baaa9-dc9f-4396-8d5f-8c081fb06d67Secondary9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1CNADECLARED9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Linux Linux Kernel All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 69eae75ca5255e876628ac5cee9eaab31f644b57 git Not specified
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 458f07ffeccd17f99942311e09ef574ddf4a414a git Not specified
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 7ffff0cc929fdfc62a74b384c4903d6496c910f0 git Not specified
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 b17a886ed29f3b70b78ccf632dad03e0c69e3c1a git Not specified
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 0d4e0afdd6658cd21dd5be61880411a2553fd1fc git Not specified
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 008b807fe487e0b15a3a6c39add4eb477f73e440 git Not specified
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 2087d53a66e97a5eb5d1bf558d5bef9e5f891757 git Not specified
CNA Linux Linux affected 354e4aa391ed50a4d827ff6fc11e0667d0859b25 3d501dd326fb1c73f1b8206d4c6e1d7b15c07e27 git Not specified
CNA Linux Linux affected 8d15569e14cfcf9151e9e3b4c0cb98369943a2bb git Not specified
CNA Linux Linux affected e252bbd8c87b95e9cecdc01350fbb0b46a0f9bf1 git Not specified
CNA Linux Linux affected 2ee4432e82437a7c051c254b065fbf5d4581e1a3 git Not specified
CNA Linux Linux affected 3.0.58 3.1 semver Not specified
CNA Linux Linux affected 3.2.37 3.3 semver Not specified
CNA Linux Linux affected 3.4.25 3.5 semver Not specified
CNA Linux Linux affected 3.8 Not specified
CNA Linux Linux unaffected 3.8 semver Not specified
CNA Linux Linux unaffected 4.14.333 4.14.* semver Not specified
CNA Linux Linux unaffected 4.19.302 4.19.* semver Not specified
CNA Linux Linux unaffected 5.4.264 5.4.* semver Not specified
CNA Linux Linux unaffected 5.10.204 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.143 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.68 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.7 6.6.* semver Not specified
CNA Linux Linux unaffected 6.7 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/b17a886ed29f3b70b78ccf632dad03e0c69e3c1a af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/69eae75ca5255e876628ac5cee9eaab31f644b57 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/2087d53a66e97a5eb5d1bf558d5bef9e5f891757 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/0d4e0afdd6658cd21dd5be61880411a2553fd1fc af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/3d501dd326fb1c73f1b8206d4c6e1d7b15c07e27 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/008b807fe487e0b15a3a6c39add4eb477f73e440 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/458f07ffeccd17f99942311e09ef574ddf4a414a af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
git.kernel.org/stable/c/7ffff0cc929fdfc62a74b384c4903d6496c910f0 af854a3a-2127-422b-91ae-364da2661108 git.kernel.org Patch
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report