Florian Westphal and Greg Kroah-Hartman
5d947222e4
netfilter: conntrack: handle tcp challenge acks during connection reuse
...
[ Upstream commit c410cb974f ]
When a connection is re-used, following can happen:
[ connection starts to close, fin sent in either direction ]
> syn # initator quickly reuses connection
< ack # peer sends a challenge ack
> rst # rst, sequence number == ack_seq of previous challenge ack
> syn # this syn is expected to pass
Problem is that the rst will fail window validation, so it gets
tagged as invalid.
If ruleset drops such packets, we get repeated syn-retransmits until
initator gives up or peer starts responding with syn/ack.
Before the commit indicated in the "Fixes" tag below this used to work:
The challenge-ack made conntrack re-init state based on the challenge
ack itself, so the following rst would pass window validation.
Add challenge-ack support: If we get ack for syn, record the ack_seq,
and then check if the rst sequence number matches the last ack number
seen in reverse direction.
Fixes: c7aab4f170 ("netfilter: nf_conntrack_tcp: re-init for syn packets only")
Reported-by: Michal Tesar <mtesar@redhat.com >
Signed-off-by: Florian Westphal <fw@strlen.de >
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-02-01 08:34:21 +01:00
..
2023-01-18 11:58:21 +01:00
2022-12-31 13:32:26 +01:00
2022-08-22 14:26:30 +01:00
2022-08-17 08:46:30 +02:00
2022-10-03 09:17:32 -07:00
2022-05-16 13:05:40 +02:00
2022-02-04 06:30:28 +01:00
2022-10-03 09:17:32 -07:00
2022-07-11 16:25:15 +02:00
2022-11-30 13:08:49 +01:00
2022-05-13 18:56:28 +02:00
2022-01-09 23:30:13 +01:00
2022-05-13 18:52:16 +02:00
2022-09-20 23:50:03 +02:00
2022-08-11 16:50:49 +02:00
2022-08-31 12:12:32 +02:00
2022-09-07 15:55:23 +02:00
2022-02-04 06:30:28 +01:00
2022-01-11 10:41:44 +01:00
2022-11-30 13:08:49 +01:00
2022-07-11 16:25:15 +02:00
2021-06-18 14:47:43 +02:00
2021-07-02 02:07:01 +02:00
2021-06-18 14:47:43 +02:00
2022-12-31 13:32:19 +01:00
2022-02-04 05:38:15 +01:00
2023-02-01 08:34:21 +01:00
2022-03-03 13:35:22 +01:00
2022-05-13 18:56:27 +02:00
2022-08-11 16:50:25 +02:00
2022-02-04 06:30:28 +01:00
2022-09-07 15:06:26 +02:00
2022-11-18 15:21:00 +01:00
2022-07-11 16:25:15 +02:00
2022-02-04 06:30:28 +01:00
2022-06-21 10:50:41 +02:00
2022-08-24 07:43:21 +02:00
2022-03-16 11:25:04 +01:00
2022-05-18 17:34:26 +02:00
2022-12-31 13:32:52 +01:00
2022-07-11 16:25:14 +02:00
2021-08-30 01:51:36 +02:00
2022-07-09 09:55:43 +02:00
2022-09-07 16:46:03 +02:00
2022-09-07 16:46:04 +02:00
2022-10-03 09:17:32 -07:00
2022-11-02 10:47:22 +01:00
2022-09-07 16:46:04 +02:00
2022-09-07 16:46:04 +02:00
2022-09-07 16:46:04 +02:00
2022-05-13 18:56:27 +02:00
2022-09-07 16:46:04 +02:00
2022-03-01 11:51:15 +01:00
2022-07-15 11:49:55 +01:00
2023-01-12 12:01:58 +01:00
2022-08-05 18:50:14 -07:00
2022-06-06 19:19:15 +02:00
2022-06-27 19:22:54 +02:00
2021-05-29 01:04:53 +02:00
2022-07-11 16:25:15 +02:00
2022-06-17 23:31:20 +02:00
2022-08-22 14:26:30 +01:00
2022-03-03 14:38:48 +00:00
2022-09-07 15:55:28 +02:00
2022-07-26 21:12:42 +02:00
2022-11-08 23:16:13 +01:00
2022-08-09 20:13:29 +02:00
2022-07-11 16:40:46 +02:00
2021-10-22 11:41:16 +01:00
2021-05-29 01:04:54 +02:00
2021-05-29 01:04:54 +02:00
2022-08-09 20:13:29 +02:00
2022-03-20 00:29:46 +01:00
2022-04-05 11:55:46 +02:00
2022-04-05 11:55:46 +02:00
2022-11-18 15:21:00 +01:00
2022-03-20 00:29:46 +01:00
2022-08-09 19:38:16 +02:00
2022-07-11 16:40:46 +02:00
2022-03-20 00:29:47 +01:00
2022-03-20 00:29:47 +01:00
2022-04-11 12:10:09 +02:00
2022-05-31 23:32:53 +02:00
2022-03-20 00:29:46 +01:00
2022-03-20 00:29:47 +01:00
2022-08-09 20:13:29 +02:00
2022-04-05 11:55:46 +02:00
2022-05-26 22:50:34 +02:00
2022-03-20 00:29:46 +01:00
2022-03-20 00:29:46 +01:00
2022-03-20 00:29:46 +01:00
2022-06-08 12:30:59 +02:00
2022-06-01 15:53:39 +02:00
2022-06-08 12:30:59 +02:00
2022-03-20 00:29:46 +01:00
2022-09-07 16:46:03 +02:00
2023-01-18 11:58:09 +01:00
2022-07-26 21:12:42 +02:00
2022-04-05 11:55:46 +02:00
2022-08-09 20:13:29 +02:00
2022-03-20 00:29:46 +01:00
2022-03-20 00:29:46 +01:00
2022-03-20 00:29:46 +01:00
2022-03-20 00:29:46 +01:00
2022-07-11 16:40:37 +02:00
2022-06-27 19:03:37 +02:00
2021-12-24 16:58:17 +01:00
2021-05-29 01:04:27 +02:00
2022-11-28 13:17:11 +01:00
2021-05-29 01:04:27 +02:00
2022-04-22 15:49:15 +02:00
2022-08-15 11:16:47 -10:00
2022-03-20 00:29:46 +01:00
2022-08-23 21:24:34 +02:00
2022-08-24 07:43:21 +02:00
2022-07-11 16:40:46 +02:00
2022-09-07 16:46:03 +02:00
2021-06-01 23:53:51 +02:00
2021-08-17 00:45:07 +02:00
2022-07-11 16:40:45 +02:00
2022-11-18 15:21:00 +01:00
2022-07-11 16:25:15 +02:00
2022-07-11 16:40:45 +02:00
2022-01-22 08:33:37 +02:00
2021-11-08 12:14:05 +01:00
2021-05-29 01:04:52 +02:00
2021-09-21 03:46:56 +02:00
2021-09-21 03:46:56 +02:00
2022-09-07 16:46:03 +02:00
2022-01-22 08:33:37 +02:00
2022-02-13 23:55:48 +01:00
2022-10-11 17:42:58 -06:00
2022-07-11 16:40:45 +02:00
2022-07-21 00:56:00 +02:00