All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu, Amitkumar Karwar <amitkarwar@gmail.com>,
	Nishant Sarmukadam <nishants@marvell.com>,
	Ganapathi Bhat <gbhat@marvell.com>,
	Xinming Hu <huxinming820@gmail.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"<netdev@vger.kernel.org>" <netdev@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: mwifiex: fix a missing check of ssid
Date: Mon, 25 Mar 2019 11:30:41 -0700	[thread overview]
Message-ID: <CA+ASDXP59t4P3nO8pGC-7NPOyFwHPSgazLF1WRu3ZexzTogypA@mail.gmail.com> (raw)
In-Reply-To: <20190323223339.13703-1-kjlu@umn.edu>

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

      reply	other threads:[~2019-03-25 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23 22:33 [PATCH] net: mwifiex: fix a missing check of ssid Kangjie Lu
2019-03-25 18:30 ` Brian Norris [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+ASDXP59t4P3nO8pGC-7NPOyFwHPSgazLF1WRu3ZexzTogypA@mail.gmail.com \
    --to=briannorris@chromium.org \
    --cc=amitkarwar@gmail.com \
    --cc=davem@davemloft.net \
    --cc=gbhat@marvell.com \
    --cc=huxinming820@gmail.com \
    --cc=kjlu@umn.edu \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nishants@marvell.com \
    --cc=pakki001@umn.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.