Files
twx-linux/net/ipv4
Eric Dumazet e077f8ff76 tcp: fix possible sk_priority leak in tcp_v4_send_reset()
[ Upstream commit 1e306ec49a ]

When tcp_v4_send_reset() is called with @sk == NULL,
we do not change ctl_sk->sk_priority, which could have been
set from a prior invocation.

Change tcp_v4_send_reset() to set sk_priority and sk_mark
fields before calling ip_send_unicast_reply().

This means tcp_v4_send_reset() and tcp_v4_send_ack()
no longer have to clear ctl_sk->sk_mark after
their call to ip_send_unicast_reply().

Fixes: f6c0f5d209 ("tcp: honor SO_PRIORITY in TIME_WAIT state")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Antoine Tenart <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:30:14 +01:00
..
2023-03-16 21:20:32 -07:00
2023-03-16 21:20:32 -07:00
2023-03-31 21:37:06 -07:00
2023-02-01 20:54:27 -08:00
2023-01-26 10:52:18 +01:00
2023-04-04 18:56:58 -07:00
2022-12-20 03:13:45 +01:00