]>
Commit | Line | Data |
---|---|---|
ad93f15b GKH |
1 | From foo@baz Mon 17 Jun 2019 06:58:02 PM CEST |
2 | From: Eric Dumazet <edumazet@google.com> | |
3 | Date: Sat, 15 Jun 2019 17:47:27 -0700 | |
4 | Subject: tcp: enforce tcp_min_snd_mss in tcp_mtu_probing() | |
5 | ||
6 | From: Eric Dumazet <edumazet@google.com> | |
7 | ||
8 | commit 967c05aee439e6e5d7d805e195b3a20ef5c433d6 upstream. | |
9 | ||
10 | If mtu probing is enabled tcp_mtu_probing() could very well end up | |
11 | with a too small MSS. | |
12 | ||
13 | Use the new sysctl tcp_min_snd_mss to make sure MSS search | |
14 | is performed in an acceptable range. | |
15 | ||
16 | CVE-2019-11479 -- tcp mss hardcoded to 48 | |
17 | ||
18 | Signed-off-by: Eric Dumazet <edumazet@google.com> | |
19 | Reported-by: Jonathan Lemon <jonathan.lemon@gmail.com> | |
20 | Cc: Jonathan Looney <jtl@netflix.com> | |
21 | Acked-by: Neal Cardwell <ncardwell@google.com> | |
22 | Cc: Yuchung Cheng <ycheng@google.com> | |
23 | Cc: Tyler Hicks <tyhicks@canonical.com> | |
24 | Cc: Bruce Curtis <brucec@netflix.com> | |
25 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
26 | Signed-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 | } |