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-next>] [day] [month] [year] [list]
Message-Id: <57D3C658-5084-417D-8365-20637A3BB79B@emc.com>
Date:	Fri, 22 Aug 2008 19:15:20 -0700
From:	Philip Love <love_phil@....com>
To:	netdev@...r.kernel.org
Subject: incorrect tcp options with window scale

Attached is a patch against the latest 2.6.27-rc4 kernel.

When window scaling is enabled, but the tcp buffer sizes are small,  
then the tcp SYN packet created will have an incorrect tcp header  
length. The tcp length is calculated assuming that the window scale  
option will be inserted into the tcp header, but since the buffer  
sizes are too small the window scale is not used. Therefore the last 4  
bytes of the options in the tcp header are left uninitialized.


This can be reproduced by first setting the following variables.

echo 8192 > /proc/sys/net/core/rmem_max
echo "4096 8192 8192" > /proc/sys/net/ipv4/tcp_rmem
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling

Then use wireshark to examine the tcp options in the SYN packet of a  
newly created connection.




*** a/net/ipv4/tcp_output.c	2008-08-20 19:35:56.000000000 -0700
--- b/net/ipv4/tcp_output.c	2008-08-22 12:04:00.000000000 -0700
***************
*** 468,474 ****
  	}
  	if (likely(sysctl_tcp_window_scaling)) {
  		opts->ws = tp->rx_opt.rcv_wscale;
! 		size += TCPOLEN_WSCALE_ALIGNED;
  	}
  	if (likely(sysctl_tcp_sack)) {
  		opts->options |= OPTION_SACK_ADVERTISE;
--- 468,475 ----
  	}
  	if (likely(sysctl_tcp_window_scaling)) {
  		opts->ws = tp->rx_opt.rcv_wscale;
! 		if(opts->ws)
! 			size += TCPOLEN_WSCALE_ALIGNED;
  	}
  	if (likely(sysctl_tcp_sack)) {
  		opts->options |= OPTION_SACK_ADVERTISE;
--
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