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] [day] [month] [year] [list]
Date:	Wed, 19 Aug 2015 22:36:59 +0200
From:	Steffen Klassert <steffen.klassert@...unet.com>
To:	David Ahern <dsa@...ulusnetworks.com>
CC:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
	<netdev@...r.kernel.org>
Subject: Re: [PATCH ipsec-next] xfrm: Use VRF master index if output device
 is enslaved

On Wed, Aug 19, 2015 at 11:35:55AM -0700, David Ahern wrote:
> >
> >I think you should use the new vrf_master_index() helper that acquires rcu because
> >it looks possible to call ->decode_session() without rcu read lock, e.g. in the hold_timer
> >function xfrm_policy_queue_process(), though I haven’t tested it and might be missing
> >something. :-)
> 
> I was digging into code paths yesterday. Today I added WARN_ON and
> seems like the rcu_read_lock is held:
> 
>         if (skb_dst(skb)) {
> WARN_ON(!rcu_read_lock_held() && !rcu_read_lock_bh_held());
>                 oif = vrf_master_ifindex_rcu(skb_dst(skb)->dev) ?
>                         : skb_dst(skb)->dev->ifindex;
> pr_info("_decode_session: oif %d skb_dst(skb)->dev->ifindex %d\n",
> oif, skb_dst(skb)->dev->ifindex);
>         }
> 
> I get the printk, but not the WARN_ON splat.

Well, this depends on the codepath that called xfrm_decode_session().
It really think it was not called through xfrm_policy_queue_process()
because this codepath is just used if the sysctl xfrm_larval_drop is switched
off (on by default) and the required xfrm_state is not yet established.

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