Netdev List
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	Mitch Williams <mitch.a.williams@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: Re: [PATCH net] rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY
Date: Thu, 5 Feb 2015 17:52:36 +0000	[thread overview]
Message-ID: <20150205175236.GA2712@casper.infradead.org> (raw)
In-Reply-To: <ceaf2a9c514600d14c9f6a89a8c38e553a85e9fe.1423158127.git.daniel@iogearbox.net>

On 02/05/15 at 06:44pm, Daniel Borkmann wrote:
> ifla_vf_policy[] is wrong in advertising its individual member types as
> NLA_BINARY since .type = NLA_BINARY in combination with .len declares the
> len member as *max* attribute length [0, len].
> 
> The issue is that when do_setvfinfo() is being called to set up a VF
> through ndo handler, we could set corrupted data if the attribute length
> is less than the size of the related structure itself.
> 
> The intent is exactly the opposite, namely to make sure to pass at least
> data of minimum size of len.
> 
> Fixes: ebc08a6f47ee ("rtnetlink: Add VF config code to rtnetlink")
> Cc: Mitch Williams <mitch.a.williams@intel.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

Acked-by: Thomas Graf <tgraf@suug.ch>

      reply	other threads:[~2015-02-05 17:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 17:44 [PATCH net] rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY Daniel Borkmann
2015-02-05 17:52 ` Thomas Graf [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=20150205175236.GA2712@casper.infradead.org \
    --to=tgraf@suug.ch \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=mitch.a.williams@intel.com \
    --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