lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99e34a60-96f9-2984-ab66-6671aa9f654b@gmail.com>
Date:   Thu, 2 Jan 2020 05:17:42 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Pengcheng Yang <yangpc@...gsu.com>, edumazet@...gle.com
Cc:     davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] tcp: fix "old stuff" D-SACK causing SACK to be treated as
 D-SACK



On 12/30/19 1:54 AM, Pengcheng Yang wrote:
> When we receive a D-SACK, where the sequence number satisfies:
> 	undo_marker <= start_seq < end_seq <= prior_snd_una
> we consider this is a valid D-SACK and tcp_is_sackblock_valid()
> returns true, then this D-SACK is discarded as "old stuff",
> but the variable first_sack_index is not marked as negative
> in tcp_sacktag_write_queue().
> 
> If this D-SACK also carries a SACK that needs to be processed
> (for example, the previous SACK segment was lost), this SACK
> will be treated as a D-SACK in the following processing of
> tcp_sacktag_write_queue(), which will eventually lead to
> incorrect updates of undo_retrans and reordering.
> 
> Fixes: fd6dad616d4f ("[TCP]: Earlier SACK block verification & simplify access to them")
> Signed-off-by: Pengcheng Yang <yangpc@...gsu.com>
> ---
>  net/ipv4/tcp_input.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 88b987c..0238b55 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -1727,8 +1727,11 @@ static int tcp_sack_cache_ok(const struct tcp_sock *tp, const struct tcp_sack_bl
>  		}
>  
>  		/* Ignore very old stuff early */
> -		if (!after(sp[used_sacks].end_seq, prior_snd_una))
> +		if (!after(sp[used_sacks].end_seq, prior_snd_una)) {
> +			if (i == 0)
> +				first_sack_index = -1;
>  			continue;
> +		}
>  
>  		used_sacks++;
>  	}
> 

Thanks for fixing this.

Signed-off-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ