[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150205175236.GA2712@casper.infradead.org>
Date: Thu, 5 Feb 2015 17:52:36 +0000
From: Thomas Graf <tgraf@...g.ch>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
Mitch Williams <mitch.a.williams@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: Re: [PATCH net] rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY
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@...el.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
Acked-by: Thomas Graf <tgraf@...g.ch>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists