Message ID | 20230504134511.828474-10-gregory.greenman@intel.com |
---|---|
State | New |
Headers | show |
Series | cfg80211/mac80211 patches from our internal tree 2023-05-04 | expand |
On Thu, 2023-05-04 at 16:45 +0300, gregory.greenman@intel.com wrote: > From: Mukesh Sisodiya <mukesh.sisodiya@intel.com> > > It's valid to pass NULL "ies" pointer to cfg80211_sme_get_conn_ies(). > Add the corresponding NULL-check to avoid NULL pointer access. Yes ... but it's not valid to do that when ies_len is 0, since you can't have NULL ies with a length ... So ... maybe we can do this patch but certainly the description is bogus. Maybe you're trying to fix some static checker warnings or something, which maybe is fine, but there was never any chance for an NPD. johannes
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 7bdeb8eea92d..77277e4bca50 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -513,7 +513,7 @@ static int cfg80211_sme_get_conn_ies(struct wireless_dev *wdev, if (!buf) return -ENOMEM; - if (ies_len) { + if (ies) { static const u8 before_extcapa[] = { /* not listing IEs expected to be created by driver */ WLAN_EID_RSN,