Skip to content

Commit

Permalink
tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()
Browse files Browse the repository at this point in the history
commit 967c05a upstream.

If mtu probing is enabled tcp_mtu_probing() could very well end up
with a too small MSS.

Use the new sysctl tcp_min_snd_mss to make sure MSS search
is performed in an acceptable range.

CVE-2019-11479 -- tcp mss hardcoded to 48

Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Jonathan Lemon <[email protected]>
Cc: Jonathan Looney <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Cc: Tyler Hicks <[email protected]>
Cc: Bruce Curtis <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Jason Xing <[email protected]>
Signed-off-by: Dust Li <[email protected]>
  • Loading branch information
Eric Dumazet authored and Dust Li committed Jun 18, 2019
1 parent e379c11 commit 1d0d26c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/tcp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk)
mss = tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low) >> 1;
mss = min(net->ipv4.sysctl_tcp_base_mss, mss);
mss = max(mss, 68 - tcp_sk(sk)->tcp_header_len);
mss = max(mss, net->ipv4.sysctl_tcp_min_snd_mss);
icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss);
}
tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
Expand Down

0 comments on commit 1d0d26c

Please sign in to comment.