Project

General

Profile

Actions

Security #8991

closed
JI LS

stream: desynchronization and detection bypass due to invalid TCP timestamp handling

Security #8991: stream: desynchronization and detection bypass due to invalid TCP timestamp handling

Added by Jason Ish 3 months ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Label:
CVE:
Git IDs:

149aa9705d7b82cc78f566acc5a725c8b97f03d0
75d23049378557401635d758d5b19b7e71ef8244

Severity:
MODERATE
Disclosure Date:
11/28/2026

Description

  1. Summary

Suricata's TCP stream engine can reconstruct and inspect a different HTTP
request than the destination server executes.

The attacker is an ordinary client. No spoofing, on-path position, or packet
insertion primitive is required. The attacker needs a raw socket to control
TCP timestamps on its own connection.

  1. Mechanism

Suricata accepts established-state TCP data segments whose timestamp option
violates PAWS while a Linux endpoint rejects them. An attacker can therefore
place a segment that the sensor accepts and the endpoint discards.

Because Suricata resolves the resulting overlap by keeping the bytes received
first, the real payload arriving later at the same sequence is discarded by
the sensor but processed by the server.

  1. Reproduction

Use one TCP connection with timestamps negotiated during the handshake,
followed by three client segments:

1. `GET /primer HTTP/1.1` at sequence S with TSval TSc+100. This advances the
endpoint's `ts.recent`.
2. `GET /benign-aaaaaa HTTP/1.1` at sequence S+len(primer) with stale TSval
TSc+2. The endpoint discards this through PAWS, but Suricata accepts it.
3. `GET /malicious-xxx HTTP/1.1` at the same sequence with fresh TSval
TSc+101. The endpoint accepts it as the first data at that sequence.
Suricata treats it as an overlapping retransmission and keeps the benign
bytes.

Replay command:

suricata -c <stock config> -S suricata.rules -r EXACT3.pcap \
-l <output dir> -k none
  1. Observed result

The Linux 6.8 endpoint parsed and served both `/primer` and
`/malicious-xxx`. It did not parse `/benign-aaaaaa`.

Replaying the same capture in Suricata with a rule matching `malicious`
produced no alerts. Suricata logged `/primer` and `/benign-aaaaaa`; the request
executed by the server was not inspected.

Removing the overlap isolates the timestamp behavior. A primer using TSval
TSc+100 followed by a request at a new sequence using stale TSval TSc+2 is
accepted by Suricata, and `stream-event:pkt_invalid_timestamp` does not fire.

  1. Affected versions

The behavior was reproduced on:

- Suricata 8.0.6 built with unit tests;
- Suricata 8.0.6 built without unit tests; and
- development `main` at commit
`7ca947114506800fa9cd6beefaa56ecad17f002e`, identifying as 9.0.0-dev.

A clean malicious request alerts normally on each build.

  1. Configuration and visibility

The bypass reproduces with `stream.liberal-timestamps` set to either `false`
or `true` and with Linux, old-Linux, Windows, BSD, and Solaris host OS
policies.

The run produces only flow and stats events. No invalid-timestamp event fires,
and `tcp.overlap_diff_data` remains zero.

  1. Limitations

The endpoint behavior was tested with Linux 6.8 and
`net.ipv4.tcp_timestamps=1`. Other endpoint stacks were not tested.

  1. Reproducer artifacts

The supplied reproducer consists of:

- `EXACT3.pcap`: complete bidirectional exchange demonstrating the bypass;
- `W0_control.pcap`: control capture that alerts normally;
- `X1_stale_no_overlap.pcap`: timestamp-only isolation case;
- `suricata.rules`: detection rule;
- `test.yaml`: Suricata-Verify characterization test; and
- `generate_pcap.py`: network-namespace and Scapy generation harness.

The artifacts are synthetic, lab-generated, and contain no production or
personal traffic.

  1. Credit

Maksim Hayder
GitHub: torjan0


Files

EXACT3.pcap (1.8 KB) EXACT3.pcap Jason Ish, 08/31/2026 11:11 PM
W0_control.pcap (344 Bytes) W0_control.pcap Jason Ish, 08/31/2026 11:11 PM
X1_stale_no_overlap.pcap (423 Bytes) X1_stale_no_overlap.pcap Jason Ish, 08/31/2026 11:11 PM
suricata.rules (273 Bytes) suricata.rules Jason Ish, 08/31/2026 11:11 PM
test.yaml (1.21 KB) test.yaml Jason Ish, 08/31/2026 11:12 PM
generate_pcap.py (3.77 KB) generate_pcap.py Jason Ish, 08/31/2026 11:12 PM

Subtasks 1 (0 open — 1 closed)

Security #8992: stream: desynchronization and detection bypass due to invalid TCP timestamp handling (8.0.x backport)ClosedLukas SismisActions

JI Updated by Jason Ish 3 months ago Actions #1

  • Target version set to 9.0.0-beta1
  • Label Needs backport to 8.0 added

OT Updated by OISF Ticketbot 3 months ago Actions #2

  • Subtask #8992 added

OT Updated by OISF Ticketbot 3 months ago Actions #3

  • Label deleted (Needs backport to 8.0)

SB Updated by Shivani Bhardwaj 3 months ago Actions #4

  • Subject changed from Suricata 8.0.6 and 9.0.0-dev: TCP timestamp handling on established-state data allows stream desynchronization and detection bypass to stream: desynchronization and detection bypass due to invalid TCP timestamp handling

PA Updated by Philippe Antoine 3 months ago Actions #6

  • Severity set to HIGH

I propose HIGH severity as an evasion with a wide scope (basically everything on TCP)

PA Updated by Philippe Antoine 3 months ago Actions #7

  • Status changed from New to Triaged

PA Updated by Philippe Antoine 3 months ago Actions #8

  • Status changed from Triaged to Assigned
  • Assignee changed from OISF Dev to Philippe Antoine

I have a simple small fix

PA Updated by Philippe Antoine 3 months ago Actions #9

  • Status changed from Assigned to In Review

Gitlab MR

JI Updated by Jason Ish 3 months ago Actions #10

  • Description updated (diff)

JI Updated by Jason Ish 3 months ago Actions #11

  • GHSA set to GHSA-jx67-v38f-gxr3

LS Updated by Lukas Sismis about 1 month ago Actions #13

  • Assignee changed from Philippe Antoine to Lukas Sismis

JI Updated by Jason Ish about 1 month ago Actions #14

  • Severity changed from HIGH to MODERATE

Reclassifying TCP bypasses to MODERATE.

PA Updated by Philippe Antoine 25 days ago Actions #15

  • Status changed from In Review to Resolved

staged

JI Updated by Jason Ish 25 days ago Actions #16

  • Git IDs updated (diff)

JI Updated by Jason Ish 25 days ago Actions #17

  • Status changed from Resolved to Closed

JI Updated by Jason Ish 7 days ago Actions #18

  • Private changed from Yes to No
Actions

Also available in: PDF Atom