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]
Date:	Fri, 02 Mar 2007 13:54:45 -0500
From:	John Heffner <jheffner@....edu>
To:	Alex Sidorenko <alexandre.sidorenko@...com>
CC:	netdev@...r.kernel.org
Subject: Re: SWS for rcvbuf < MTU

Alex Sidorenko wrote:
[snip]
> --- net/ipv4/tcp_output.c.orig  Wed May  3 20:40:43 2006
> +++ net/ipv4/tcp_output.c       Tue Jan 30 14:24:56 2007
> @@ -641,6 +641,7 @@
>   * Note, we don't "adjust" for TIMESTAMP or SACK option bytes.
>   * Regular options like TIMESTAMP are taken into account.
>   */
> +static const char *SWS_id_string="@#SWS-fix-2";
>  u32 __tcp_select_window(struct sock *sk)
>  {
>         struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
> @@ -682,6 +683,9 @@
>         window = tp->rcv_wnd;
>         if (window <= free_space - mss || window > free_space)
>                 window = (free_space/mss)*mss;
> +        /* A fix for small rcvbuf asid@...com */
> +       else if (mss == full_space && window < full_space/2)
> +               window = full_space/2;
> 
>         return window;
>  }

Good analysis of the problem, but the patch does not look quite right. 
In particular, you can't ever announce a zero window. :)

I think this attached patch does the correct SWS avoidance.

Thanks,
   -John


View attachment "r-sws.patch" of type "text/plain" (913 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ