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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Jul 2012 10:13:36 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	roy.qing.li@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] ipv6: remove unnecessary codes in
 tcp_ipv6.c

On Sun, 2012-07-01 at 20:26 -0700, David Miller wrote:
> From: roy.qing.li@...il.com
> Date: Mon,  2 Jul 2012 11:18:59 +0800
> 
> > -	if (opt) {
> > -		newnp->opt = ipv6_dup_options(newsk, opt);
> > -		if (opt != np->opt)
> > -			sock_kfree_s(sk, opt, opt->tot_len);
> 
> This is bogus, if we copy the options into a new copy in
> ipv6_dup_options() we have to free the old one or else we
> leak it.

Note that the old one is the np->opt of the listener, not the child.

I dont understand how np->opt could change under us, since we have
the listener socket locked.

If np->opt can change under us, we are doomed and need to add refcounts.




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