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-next>] [day] [month] [year] [list]
Message-Id: <20130620125823.da633b21e33688372729b9c0@canb.auug.org.au>
Date:	Thu, 20 Jun 2013 12:58:23 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Johannes Berg <johannes.berg@...el.com>
Subject: linux-next: manual merge of the net-next tree with the net tree

Hi all,

Today's linux-next merge of the net-next tree got a conflict in
net/wireless/nl80211.c between commit 3a5a423bb958 ("nl80211: fix attrbuf
access race by allocating a separate one") from the net tree and commit
5fe231e87372 ("cfg80211: vastly simplify locking") from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc net/wireless/nl80211.c
index b14b7e3,31d265f..0000000
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@@ -1564,17 -1527,12 +1527,17 @@@ static int nl80211_dump_wiphy(struct sk
  	struct cfg80211_registered_device *dev;
  	s64 filter_wiphy = -1;
  	bool split = false;
 -	struct nlattr **tb = nl80211_fam.attrbuf;
 +	struct nlattr **tb;
  	int res;
  
 +	/* will be zeroed in nlmsg_parse() */
 +	tb = kmalloc(sizeof(*tb) * (NL80211_ATTR_MAX + 1), GFP_KERNEL);
 +	if (!tb)
 +		return -ENOMEM;
 +
- 	mutex_lock(&cfg80211_mutex);
+ 	rtnl_lock();
  	res = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
 -			  tb, nl80211_fam.maxattr, nl80211_policy);
 +			  tb, NL80211_ATTR_MAX, nl80211_policy);
  	if (res == 0) {
  		split = tb[NL80211_ATTR_SPLIT_WIPHY_DUMP];
  		if (tb[NL80211_ATTR_WIPHY])
@@@ -1586,11 -1544,8 +1549,10 @@@
  			int ifidx = nla_get_u32(tb[NL80211_ATTR_IFINDEX]);
  
  			netdev = dev_get_by_index(sock_net(skb->sk), ifidx);
 -			if (!netdev)
 +			if (!netdev) {
- 				mutex_unlock(&cfg80211_mutex);
 +				kfree(tb);
  				return -ENODEV;
 +			}
  			if (netdev->ieee80211_ptr) {
  				dev = wiphy_to_dev(
  					netdev->ieee80211_ptr->wiphy);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ