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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Feb 2010 15:22:16 -0800 (PST)
From:	Joe Cao <caoco2002@...oo.com>
To:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: bug and question in tcp stack

Hi,

I think it is an obvious bug both in the old and latest kernel:

In function net/ipv4/tcp_output.c, tcp_retransmit_skb() returns a NEGTIVE value on failures.  But in net/ipv4/tcp_timer.c, in function tcp_retransmit_timer(), the line

if (tcp_retransmit_skb(sk, tcp_write_queue_head(sk)) > 0) {

checks the return value as a positive number, which will never be true.  On failures from tcp_retransmit_skb(), the code will follow the wrong path.

My second question is regarding the function tcp_retransmit_skb().  The first check in the function is copied here:

 	/* Do not sent more than we queued. 1/4 is reserved for possible
	 * copying overhead: fragmentation, tunneling, mangling etc.
	 */
	if (atomic_read(&sk->sk_wmem_alloc) >
	    min(sk->sk_wmem_queued + (sk->sk_wmem_queued >> 2), sk->sk_sndbuf))
		return -EAGAIN;


My question is if that turns out to be true, which I saw happend, how could the stack get out of the state?  Because all TCP retransmission may fail, no buffer will be released.  The connection is virtually dead.  Is that true?

Thanks,
Joe


      
--
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