[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <127c411cc06e04b61220a571f5332b9155c69f77.camel@sipsolutions.net>
Date: Wed, 24 Jul 2019 14:40:33 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Jia-Ju Bai <baijiaju1990@...il.com>, davem@...emloft.net
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net: mac80211: Fix possible null-pointer
dereferences in ieee80211_setup_sdata()
On Wed, 2019-07-24 at 20:36 +0800, Jia-Ju Bai wrote:
> In ieee80211_setup_sdata(), there is an if statement on line 1410 to
> check whether sdata->dev is NULL:
> if (sdata->dev)
>
> When sdata->dev is NULL, it is used on lines 1458 and 1459:
> sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP;
> sdata->dev->netdev_ops = &ieee80211_monitorif_ops;
>
> Thus, possible null-pointer dereferences may occur.
No, this cannot happen, monitor interfaces (NL80211_IFTYPE_MONITOR) must
have a valid ->dev, only P2P device and NAN might not.
johannes
Powered by blists - more mailing lists