Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Johan ter Mors
Tue, 24 Nov 2026 22:49
TCP: RFC 5961 challenge-ACK budgeting and unpaced RST emission on closed ports — lab measurement + consistency question (6.12, l...
Author: Johan ter Mors
Date: Tue, 24 Nov 2026 22:49
Date: Tue, 24 Nov 2026 22:49
61 lines
14551 bytes
14551 bytes
Hi netdev,
I am running a defensive-security evaluation of the TCP stack (authorized
lab; all traffic between my own namespaces/loopback, kernels 6.12.117 and
5.10.134). While calibrating the RFC 5961 challenge-ACK mechanism against
a blind-SYN storm, I measured two related behaviors that I would like to
have confirmed as intended, and one consistency question. I do NOT claim
this is a bug, a crash, or a memory-safety issue, and I claim no
exploitability — this is a measurement and a design-consistency question.
# Observed (lab measurement, 6.12.117, loopback/netns only)
1. Challenge-ACK levering holds. Under sustained blind-SYN pressure
(synthetic storm against closed ports, aggregate ~500 pkt/s in the
calibrated run; levering verified 100% up to the raw-socket EPERM
gate in the high-rate run), challenge-ACK responses keep arriving —
I could not induce the challenge-ACK latency degradation itself on
Linux.
2. RST emission on closed ports is effectively unpaced. In the same
storm, RST levering stayed 100% up to ~230k packets/s (the cap in our
rig being the raw-socket EPERM gate, not the kernel). This is the
mirror of FreeBSD, where the challenge-ACK path and the RST path
share one badport_bandlim(BANDLIM_TCP_RST) budget and the challenge
latency degrades under blind-SYN pressure (we measured up to 639x
per-connection median outliers there — that part is being reported to
FreeBSD secteam separately under coordinated disclosure).
3. Code observation: tcp_challenge_ack_allowed() implements the per-netns
random-bucket scheme (net.ipv4.tcp_challenge_ack_limit); I see no
shared budget between the challenge-ACK path and RST emission on
closed ports, matching the measurements above.
# Questions
a. Is the absence of a shared band between challenge-ACK emission and
RST emission intended policy on Linux (i.e., Linux deliberately
couples neither to the ICMP/badport-style rate limit the way
FreeBSD's badport_bandlim() does)?
b. Paced-mirror experiment: when we pace the RST/challenge offer down
(7 tiers, 32.6-2086.7 pkt/s), levering is 100% at every tier — the
same experiment on FreeBSD 14.4 shows a hard plateau (~126-138
responses/s). Is any pacing/bandlim intended for the unpaced RST
path, or is "RST levering effectively unlimited by default" the
documented/expected posture?
Everything needed to re-run is a single C program per experiment (no
external dependencies, loopback-only, ~1 minute per run):
poc_tcp_challenge_budget.c and poc_tcp_rstlad_paced.c; artifacts
(challenge-20261124T175428Z, rstlad-20261124T181803Z) available on
request. No crashes, no memory-safety observations, kernel log clean over
all runs, no traffic to or from any external system. Happy to bisect,
re-run on other versions, or add instrumentation on request.
Thanks,
Johan ter Mors — independent researcher
Re: TCP: RFC 5961 challenge-ACK budgeting and unpaced RST emission on closed ports — lab measurement + consistency question (6.1...
Author: Johan ter Mors
Date: Wed, 25 Nov 2026 13:49
Date: Wed, 25 Nov 2026 13:49
100 lines
15966 bytes
15966 bytes
Op wo 25 nov 2026 om 11:30 schreef Paolo Abeni <pabeni@redhat.com>: > > On 11/24/26 23:49, Johan ter Mors wrote: > > Hi netdev, > > > > I am running a defensive-security evaluation of the TCP stack (authorized > > lab; all traffic between my own namespaces/loopback, kernels 6.12.117 and > > 5.10.134). While calibrating the RFC 5961 challenge-ACK mechanism against > > a blind-SYN storm, I measured two related behaviors that I would like to > > have confirmed as intended, and one consistency question. I do NOT claim > > this is a bug, a crash, or a memory-safety issue, and I claim no > > exploitability — this is a measurement and a design-consistency question. > > > > # Observed (lab measurement, 6.12.117, loopback/netns only) > > Why using an old kernel? You should run the current last release. Point taken. My lab targets the 6.12 LTS line (currently at .119 upstream; my guest runs .117) and the host distro's 5.10 kernel. Both PoCs are single C files (no dependencies, ~1 minute per run, loopback-only), so I am rebuilding the guest on the current stable release (7.3.6) with the same lean config and will report the levering numbers for both PoCs back in this thread. > > > > > 1. Challenge-ACK levering holds. Under sustained blind-SYN pressure > > (synthetic storm against closed ports, aggregate ~500 pkt/s in the > > calibrated run; levering verified 100% up to the raw-socket EPERM > > gate in the high-rate run), challenge-ACK responses keep arriving — > > I could not induce the challenge-ACK latency degradation itself on > > Linux. > > It's totally unclear to me how many ack/sec per socket are you observing. > Since 6.0 challenge-ack limit is on a per socket basis. I should have separated the two paths — thank you for asking. The ~500 pkt/s aggregate was the closed-port RST storm; no socket is involved in that path, so there is no ack/sec-per-socket figure for it. The per-socket challenge-ACK experiment in my evaluation ran on kernel 5.10.134: two concurrent victim sockets, 60 out-of-window probes each; each socket independently received 30 challenge-ACKs (A 60/30 and B 60/30), no cross-socket suppression. One precision: on 5.10 the active mechanism is the per-netns random bucket (the 2016-5696 fix), not per-socket granularity — that arrived in 6.0. I will re-run the same cell on the current release, where the limit is per socket, and include per-socket ack/s curves at fixed probe rates. > > # Questions > > > > a. Is the absence of a shared band between challenge-ACK emission and > > RST emission intended policy on Linux (i.e., Linux deliberately > > couples neither to the ICMP/badport-style rate limit the way > > FreeBSD's badport_bandlim() does)? > > Intended AFAICS. Thank you — I have registered this in my evaluation notes as vendor confirmation. > > > b. Paced-mirror experiment: when we pace the RST/challenge offer down > > (7 tiers, 32.6-2086.7 pkt/s), levering is 100% at every tier — the > > same experiment on FreeBSD 14.4 shows a hard plateau (~126-138 > > responses/s). Is any pacing/bandlim intended for the unpaced RST > > path, or is "RST levering effectively unlimited by default" the > > documented/expected posture? > > RST on closed port are intentionally not rate-limited. Thank you as well — noted as the expected posture. That makes the cross-stack asymmetry deliberate on both sides (FreeBSD's shared badport_bandlim() budget vs Linux's unlimited levering), useful context for the FreeBSD report I am preparing for their secteam (coordinated disclosure, separate thread). No bug claim anywhere in this thread; kernel log clean over all runs, no traffic outside my own namespaces. Artifacts available on request. Thanks and regards, Johan ter Mors — independent researcher > > @Kuniyuki: please correct me as needed. > > /P >
Re: TCP: RFC 5961 challenge-ACK budgeting and unpaced RST emission on closed ports — lab measurement + consistency question (6.1...
Author: Johan ter Mors
Date: Wed, 25 Nov 2026 14:19
Date: Wed, 25 Nov 2026 14:19
149 lines
18267 bytes
18267 bytes
As promised earlier in this thread, I rebuilt the lab guest on the current
stable release (7.3.6, tarball verified against kernel.org) and re-ran both
PoCs plus the per-socket cell at fixed probe rates. All loopback/netns
only, lab-only, and still no bug claim anywhere.
1. Closed-port RST levering (poc_tcp_rstlad_paced.c, plus the unpaced
ladder inside poc_tcp_challenge_budget.c): delivery 100.0% at every
step — paced ladder 32.6 to 2086.7 pps (real pacing within 0.3 pps of
target at every step, challenge_delta=0 throughout) and unpaced ladder
~10k-20k pps in the guest. Identical to my earlier numbers on 6.12.117
and 5.10.134: the RST path on closed ports remains unrate-limited on
7.3.6 and does not share a band with challenge-ACK emission.
2. Per-socket challenge-ACK budget (the cell I promised curves for): two
concurrent victim sockets per probe rate, 60 out-of-window ACK probes
per socket, challenges counted per socket by sniffing the loopback
responses. On 7.3.6 (challenge_ack_limit at the INT_MAX default, same
as my 6.12 guest) both sockets independently receive an identical
per-socket budget — a time-based cap of ~2 challenge-ACKs per second
per socket, independent of the probe rate, with no cross-socket
suppression. Reproduced identically across three boots:
probe rate sock A sock B cap per socket
10/s 12/60 12/60 ~2.0/s (6.0 s window)
20/s 6/60 6/60 ~2.0/s (3.0 s window)
50/s 3/60 3/60 ~2.5/s (1.2 s window)
For calibration against my earlier mail: on 5.10.134 (per-netns random
bucket, default limit) the same cell showed 30/60 per socket; on 7.3.6
the per-socket regime is directly visible as the ~2/s cap above.
No bug claim, no exploitability claim; kernel log clean across all runs,
no traffic outside my own namespaces. Artifacts available on request.
KR,
Johan ter Mors
>
> Op wo 25 nov 2026 om 11:30 schreef Paolo Abeni <pabeni@redhat.com>:
> >
> > On 11/24/26 23:49, Johan ter Mors wrote:
> > > Hi netdev,
> > >
> > > I am running a defensive-security evaluation of the TCP stack (authorized
> > > lab; all traffic between my own namespaces/loopback, kernels 6.12.117 and
> > > 5.10.134). While calibrating the RFC 5961 challenge-ACK mechanism against
> > > a blind-SYN storm, I measured two related behaviors that I would like to
> > > have confirmed as intended, and one consistency question. I do NOT claim
> > > this is a bug, a crash, or a memory-safety issue, and I claim no
> > > exploitability — this is a measurement and a design-consistency question.
> > >
> > > # Observed (lab measurement, 6.12.117, loopback/netns only)
> >
> > Why using an old kernel? You should run the current last release.
>
> Point taken. My lab targets the 6.12 LTS line (currently at .119 upstream;
> my guest runs .117) and the host distro's 5.10 kernel. Both PoCs are single
> C files (no dependencies, ~1 minute per run, loopback-only), so I am
> rebuilding the guest on the current stable release (7.3.6) with the same
> lean config and will report the levering numbers for both PoCs back in this
> thread.
>
> >
> > >
> > > 1. Challenge-ACK levering holds. Under sustained blind-SYN pressure
> > > (synthetic storm against closed ports, aggregate ~500 pkt/s in the
> > > calibrated run; levering verified 100% up to the raw-socket EPERM
> > > gate in the high-rate run), challenge-ACK responses keep arriving —
> > > I could not induce the challenge-ACK latency degradation itself on
> > > Linux.
> >
> > It's totally unclear to me how many ack/sec per socket are you observing.
> > Since 6.0 challenge-ack limit is on a per socket basis.
>
> I should have separated the two paths — thank you for asking. The ~500
> pkt/s aggregate was the closed-port RST storm; no socket is involved in
> that path, so there is no ack/sec-per-socket figure for it. The
> per-socket challenge-ACK experiment in my evaluation ran on kernel
> 5.10.134: two concurrent victim sockets, 60 out-of-window probes each;
> each socket independently received 30 challenge-ACKs (A 60/30 and
> B 60/30), no cross-socket suppression. One precision: on 5.10 the active
> mechanism is the per-netns random bucket (the 2016-5696 fix), not
> per-socket granularity — that arrived in 6.0. I will re-run the same cell
> on the current release, where the limit is per socket, and include
> per-socket ack/s curves at fixed probe rates.
>
> > > # Questions
> > >
> > > a. Is the absence of a shared band between challenge-ACK emission and
> > > RST emission intended policy on Linux (i.e., Linux deliberately
> > > couples neither to the ICMP/badport-style rate limit the way
> > > FreeBSD's badport_bandlim() does)?
> >
> > Intended AFAICS.
>
> Thank you — I have registered this in my evaluation notes as vendor
> confirmation.
>
> >
> > > b. Paced-mirror experiment: when we pace the RST/challenge offer down
> > > (7 tiers, 32.6-2086.7 pkt/s), levering is 100% at every tier — the
> > > same experiment on FreeBSD 14.4 shows a hard plateau (~126-138
> > > responses/s). Is any pacing/bandlim intended for the unpaced RST
> > > path, or is "RST levering effectively unlimited by default" the
> > > documented/expected posture?
> >
> > RST on closed port are intentionally not rate-limited.
>
> Thank you as well — noted as the expected posture. That makes the
> cross-stack asymmetry deliberate on both sides (FreeBSD's shared
> badport_bandlim() budget vs Linux's unlimited levering), useful context
> for the FreeBSD report I am preparing for their secteam (coordinated
> disclosure, separate thread).
>
> No bug claim anywhere in this thread; kernel log clean over all runs, no
> traffic outside my own namespaces. Artifacts available on request.
>
> Thanks and regards,
> Johan ter Mors — independent researcher
>
> >
> > @Kuniyuki: please correct me as needed.
> >
> > /P
> >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads