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:	Thu, 10 Dec 2009 14:31:56 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	William Allen Simpson <william.allen.simpson@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, davem@...emloft.net,
	Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH] net-ipv4-tcp.c-fix-warning-from-older-compilers.patch

On Thu, 2009-12-10 at 09:16 -0500, William Allen Simpson wrote:
> Replace + net-ipv4-tcpc-fix-warning.patch added to -mm tree
> 
> Remove the offending code, and replace with comments.  This is an
> unlikely problem, so depend on human finding any future error.
> 
> Signed-off-by: William.Allen.Simpson@...il.com
> ---
>   net/ipv4/tcp.c |    9 ++++-----
>   1 files changed, 4 insertions(+), 5 deletions(-)
> plain text document attachment
> (net-ipv4-tcp.c-fix-warning-from-older-compilers.patch)
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index c8666b7..3782c17 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2540,11 +2540,10 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
>  			ctd.tcpct_cookie_desired = cvp->cookie_desired;
>  			ctd.tcpct_s_data_desired = cvp->s_data_desired;
>  
> -			/* Cookie(s) saved, return as nonce */
> -			if (sizeof(ctd.tcpct_value) < cvp->cookie_pair_size) {
> -				/* impossible? */
> -				return -EINVAL;
> -			}
> +			/* Cookie(s) saved, return as nonce.
> +			 * Assumes TCP_MSS_DEFAULT > TCP_COOKIE_PAIR_SIZE,
[...]

You can use BUILD_BUG_ON() to ensure that remains true.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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