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]
Message-ID: <CAHA+R7N2mWAQhQwb+y8NEDaHW8wHB7D+w883y0zO3YBOeOVegA@mail.gmail.com>
Date:	Tue, 24 Nov 2015 10:56:46 -0800
From:	Cong Wang <cwang@...pensource.com>
To:	Nikolay Aleksandrov <razor@...ckwall.org>
Cc:	netdev <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: Re: [PATCH net] net: ipmr, ip6mr: fix vif/tunnel failure race condition

On Tue, Nov 24, 2015 at 8:09 AM, Nikolay Aleksandrov
<razor@...ckwall.org> wrote:
> From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
>
> Since (at least) commit b17a7c179dd3 ("[NET]: Do sysfs registration as
> part of register_netdevice."), netdev_run_todo() deals only with
> unregistration, so we don't need to do the rtnl_unlock/lock cycle to
> finish registration when failing pimreg or dvmrp device creation. In
> fact that opens a race condition where someone can delete the device
> while rtnl is unlocked because it's fully registered. The problem gets
> worse when netlink support is introduced as there are more points of entry
> that can cause it and it also makes reusing that code correctly impossible.
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>

Makes sense for me, we do have some other cases (e.g. macvlan) where
we call unregister_netdevice() in error path without re-taking RTNL lock.

So,

Reviewed-by: Cong Wang <cwang@...pensource.com>

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