Netdev Archive on
help / color / mirror / Atom feed
From: David Miller <>
Subject: Re: [PATCH] netlink: policy: correct validation type check
Date: Mon, 31 Aug 2020 12:02:50 -0700 (PDT)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20200831202805.8ca5a2fe1ffb.I46f0d5bee0a774517aeec539620895a473dd2299@changeid>

From: Johannes Berg <>
Date: Mon, 31 Aug 2020 20:28:05 +0200

> From: Johannes Berg <>
> In the policy export for binary attributes I erroneously used
> a != NLA_VALIDATE_NONE comparison instead of checking for the
> two possible values, which meant that if a validation function
> pointer ended up aliasing the min/max as negatives, we'd hit
> a warning in nla_get_range_unsigned().
> Fix this to correctly check for only the two types that should
> be handled here, i.e. range with or without warn-too-long.
> Reported-by:
> Fixes: 8aa26c575fb3 ("netlink: make NLA_BINARY validation more flexible")
> Signed-off-by: Johannes Berg <>

Applied, thank you.

      reply	other threads:[~2020-08-31 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 16:47 WARNING in nla_get_range_unsigned syzbot
2020-08-31 18:28 ` [PATCH] netlink: policy: correct validation type check Johannes Berg
2020-08-31 19:02   ` David Miller [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:

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

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] netlink: policy: correct validation type check' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).