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: <1209314906.29301.148.camel@tng>
Date:	Sun, 27 Apr 2008 12:48:26 -0400
From:	Patrick McManus <mcmanus@...ksong.com>
To:	Evgeniy Polyakov <johnpol@....mipt.ru>
Cc:	Eric Sesterhenn <snakebyte@....de>, netdev@...r.kernel.org,
	davem@...emloft.net, ilpo.jarvinen@...sinki.fi
Subject: Re: Slab Corruption with ipv6 and tcp6fuzz

On Sat, 2008-04-26 at 20:05 +0400, Evgeniy Polyakov wrote:

> > tcp_v6_do_rcv()->tcp_rcv_established(), the latter goes to step5, where
> > eventually skb can be freed via tcp_data_queue() (drop: label), then if
> > check for tcp_defer_accept_check() returns true and thus
> > tcp_rcv_established() returns -1, which forces tcp_v6_do_rcv() to jump
> > to reset: label, which in turn will pass through discard: label and free
> > the same skb again.
> >  

yep. That buggy test was logic from a different strategy long
discarded.. the skb is always queued/dropped independently of
defer_accept_check() and as such it shouldn't impact the return value of
rcv_established.

I was able to reproduce by forcing the fuzzer to play with DEFER_ACCEPT
100% of the time, and with the patch tests out fine as do the original
defer_accept tests.

Sorry for the bug, and thanks Evgeniy for fixing it and Eric for finding
it.

Acked-By: Patrick McManus <mcmanus@...ksong.com>

> 
> Please test. This bug affects both ipv6 and ipv4 code actually.
> 
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index ac9b848..0298f80 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -4925,8 +4925,7 @@ step5:
>  	tcp_data_snd_check(sk);
>  	tcp_ack_snd_check(sk);
>  
> -	if (tcp_defer_accept_check(sk))
> -		return -1;
> +	tcp_defer_accept_check(sk);
>  	return 0;
>  
>  csum_error:
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ