]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.182/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch
Linux 4.4.182
[thirdparty/kernel/stable-queue.git] / releases / 4.4.182 / tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch
CommitLineData
ad93f15b
GKH
1From foo@baz Mon 17 Jun 2019 06:58:02 PM CEST
2From: Eric Dumazet <edumazet@google.com>
3Date: Sat, 15 Jun 2019 17:47:27 -0700
4Subject: tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()
5
6From: Eric Dumazet <edumazet@google.com>
7
8commit 967c05aee439e6e5d7d805e195b3a20ef5c433d6 upstream.
9
10If mtu probing is enabled tcp_mtu_probing() could very well end up
11with a too small MSS.
12
13Use the new sysctl tcp_min_snd_mss to make sure MSS search
14is performed in an acceptable range.
15
16CVE-2019-11479 -- tcp mss hardcoded to 48
17
18Signed-off-by: Eric Dumazet <edumazet@google.com>
19Reported-by: Jonathan Lemon <jonathan.lemon@gmail.com>
20Cc: Jonathan Looney <jtl@netflix.com>
21Acked-by: Neal Cardwell <ncardwell@google.com>
22Cc: Yuchung Cheng <ycheng@google.com>
23Cc: Tyler Hicks <tyhicks@canonical.com>
24Cc: Bruce Curtis <brucec@netflix.com>
25Signed-off-by: David S. Miller <davem@davemloft.net>
26Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27---
28 net/ipv4/tcp_timer.c | 1 +
29 1 file changed, 1 insertion(+)
30
31--- a/net/ipv4/tcp_timer.c
32+++ b/net/ipv4/tcp_timer.c
33@@ -132,6 +132,7 @@ static void tcp_mtu_probing(struct inet_
34 mss = tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low) >> 1;
35 mss = min(net->ipv4.sysctl_tcp_base_mss, mss);
36 mss = max(mss, 68 - tp->tcp_header_len);
37+ mss = max(mss, net->ipv4.sysctl_tcp_min_snd_mss);
38 icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss);
39 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
40 }