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:	Tue, 1 Sep 2015 18:55:31 -0700
From:	Martin KaFai Lau <kafai@...com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	netdev <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Kernel Team <kernel-team@...com>
Subject: Re: [PATCH net 3/3] ipv6: Fix dst_entry refcnt bugs in ip6_tunnel

On Tue, Sep 01, 2015 at 01:14:20PM -0700, Eric Dumazet wrote:
> On Tue, 2015-09-01 at 11:55 -0700, Martin KaFai Lau wrote:
> > Problems in the current dst_entry cache in the ip6_tunnel:
> >
> > 1. ip6_tnl_dst_set is racy.  There is no lock to protect it:
> >    - One major problem is that the dst refcnt gets messed up. F.e.
> >      the same dst_cache can be released multiple times and then
> >      triggering the infamous dst refcnt < 0 warning message.
> >    - Another issue is the inconsistency between dst_cache and
> >      dst_cookie.
> >
> >    It can be reproduced by adding and removing the ip6gre tunnel
> >    while running a super_netperf TCP_CRR test.
> >
> > 2. In ip6_tnl_xmit2() and ip6gre_xmit2(), the outgoing skb does
> >    not hold a dst_entry's refcnt.
>
> It should not be a problem. refcnt is taken when/if necessary (skb
> queued on a qdisc for example)
>
> We have other uses of skb_dst_set_noref()
>
> Please describe the problem ?
After some more thoughts, I think it could be that the commit description is
inaccurate/confusing.  skb_dst_set_noref() is not the _source_ of the
problem per se.  Instead, the ip6_tnl_dst_get() should always bump the
dst refcnt before returning the dst. Using skb_dst_set() instead
of skb_dst_set_noref() here is just a follow-through effect.
--
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