netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dsahern@gmail.com
Cc: netdev@vger.kernel.org, johannes@sipsolutions.net
Subject: Re: [PATCH v2 net] netlink: Relax attr validation for fixed length types
Date: Thu, 07 Dec 2017 14:01:35 -0500 (EST)	[thread overview]
Message-ID: <20171207.140135.1304328389878622018.davem@davemloft.net> (raw)
In-Reply-To: <20171207040912.15676-1-dsahern@gmail.com>

From: David Ahern <dsahern@gmail.com>
Date: Wed,  6 Dec 2017 20:09:12 -0800

> Commit 28033ae4e0f5 ("net: netlink: Update attr validation to require
> exact length for some types") requires attributes using types NLA_U* and
> NLA_S* to have an exact length. This change is exposing bugs in various
> userspace commands that are sending attributes with an invalid length
> (e.g., attribute has type NLA_U8 and userspace sends NLA_U32). While
> the commands are clearly broken and need to be fixed, users are arguing
> that the sudden change in enforcement is breaking older commands on
> newer kernels for use cases that otherwise "worked".
> 
> Relax the validation to print a warning mesage similar to what is done
> for messages containing extra bytes after parsing.
> 
> Fixes: 28033ae4e0f5 ("net: netlink: Update attr validation to require exact length for some types")
> Signed-off-by: David Ahern <dsahern@gmail.com>
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> v2
> - updated the comment before nla_attr_len and removed the outdated
>   comment before use of nla_attr_len

Applied and queued up for -stable, thanks David.

      reply	other threads:[~2017-12-07 19:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  4:09 [PATCH v2 net] netlink: Relax attr validation for fixed length types David Ahern
2017-12-07 19:01 ` 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:
  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=20171207.140135.1304328389878622018.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).