Linux wireless drivers development
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
	linux-wireless@vger.kernel.org, cjhuang@codeaurora.org
Subject: Re: [PATCH mac80211] cfg80211: check nla_parse_nested return code in nl80211_set_sar_specs
Date: Mon, 22 Nov 2021 11:58:38 +0100	[thread overview]
Message-ID: <YZt33qMzxkxSAAxY@lore-desk> (raw)
In-Reply-To: <a54298c0b747ba562caa47f271f058b9831810ee.camel@sipsolutions.net>

[-- Attachment #1: Type: text/plain, Size: 724 bytes --]

> On Sun, 2021-11-21 at 12:41 +0100, Lorenzo Bianconi wrote:
> > Check error code returned by nla_parse_nested in nl80211_set_sar_specs
> > routine before parsing SAR sub-specs.
> > 
> 
> I don't think we need to. The policy already states it:
> 
>         [NL80211_ATTR_SAR_SPEC] = NLA_POLICY_NESTED(sar_policy),

ack, right, I missed that. I guess we can drop the patch.

Regards,
Lorenzo

> 
> 
> Since we always parse the top-level already in the generic netlink code,
> it will recurse down here by way of that policy link, and then it will
> already be validated as much as nla_parse_nested() can do again - so we
> only do it again here to actually get access to the pointers.
> 
> johannes
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2021-11-22 10:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-21 11:41 [PATCH mac80211] cfg80211: check nla_parse_nested return code in nl80211_set_sar_specs Lorenzo Bianconi
2021-11-22  8:18 ` Johannes Berg
2021-11-22 10:58   ` Lorenzo Bianconi [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=YZt33qMzxkxSAAxY@lore-desk \
    --to=lorenzo.bianconi@redhat.com \
    --cc=cjhuang@codeaurora.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox