netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RSTs being marked as invalid because of wrong td_maxack value
@ 2021-04-23 15:54 Ali Abdallah
  2021-04-23 16:26 ` Florian Westphal
  0 siblings, 1 reply; 4+ messages in thread
From: Ali Abdallah @ 2021-04-23 15:54 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

Greetings,

We are seeing the following situation, on an established connection:

1: 2049 → 703 [RST, ACK] Seq=1202969688 Ack=1132949130
2: [TCP Port numbers reused] 703 → 2049 [SYN] Seq=1433611541
3: [TCP Out-Of-Order] 703 → 2049 [PSH, ACK] Seq=1132949130 Ack=1202969688
4: 2049 → 703 [RST, ACK] Seq=0 Ack=1433611542

The RST in 4 is dropped, printing out the td_maxack value, it turns out
to be:

nf_ct_tcp: invalid RST seq:0 td_maxack:1202969688 SRC=10.78.206.110
DST=10.78.202.146 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=43722 DF PROTO=TCP
SPT=2049 DPT=703 SEQ=0 ACK=1433611542 WINDOW=0 RES=0x00 ACK RST URGP=0

So basically the SYN in 2 resets the IP_CT_TCP_FLAG_MAXACK_SET, while
the out of order frame 3 resets it back, and we end up having again
td_maxack=1202969688, that is compared against Seq=0 and the RST is dropped.

While we are still testing a proper fix, we would like to have the RST
check introduced in [1] tunable. I can send a patch to add a proc bit
for that, but I'm wondering whether or not to re-use the tcp_be_liberal
option. Please let me know which option would work best for you.

Thanks in advance.

[1] https://patchwork.ozlabs.org/project/netdev/patch/20090527143523.4649.91602.sendpatchset@x2.localnet/

-- 
Ali Abdallah | SUSE Linux L3 Engineer
GPG fingerprint: 51A0 F4A0 C8CF C98F 842E  A9A8 B945 56F8 1C85 D0D5


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-26 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-23 15:54 RSTs being marked as invalid because of wrong td_maxack value Ali Abdallah
2021-04-23 16:26 ` Florian Westphal
2021-04-26  7:57   ` Ali Abdallah
2021-04-26 10:11     ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).