lkml.org 
[lkml]   [2019]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] net: mwifiex: fix a missing check of ssid
On Sat, Mar 23, 2019 at 3:34 PM Kangjie Lu <kjlu@umn.edu> wrote:
> sme->ssid may be invalid and thus should be checked.

Under what conditions are you seeing this? I see that brcmfmac, for
one, also has a similar check, but IIUC, the connect API always
pre-checks that there's an SSID provided:

static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct cfg80211_connect_params connect;
struct wiphy *wiphy;
struct cfg80211_cached_keys *connkeys = NULL;
int err;

memset(&connect, 0, sizeof(connect));

if (!info->attrs[NL80211_ATTR_SSID] ||
!nla_len(info->attrs[NL80211_ATTR_SSID]))
return -EINVAL;
...
connect.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]);


So this patch shouldn't be necessary.

Perhaps I'm missing something though.

Regards,
Brian

\
 
 \ /
  Last update: 2019-03-25 19:31    [W:0.063 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site