netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iproute PATCH 0/2] Check MAC address length when changing it
@ 2016-06-16 14:19 Phil Sutter
  2016-06-16 14:19 ` [iproute PATCH 1/2] iplink: Add missing variable initialization Phil Sutter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Phil Sutter @ 2016-06-16 14:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

Due to minimal checking in kernel space, MAC address setting was
problematic in multiple ways:

- Setting an overly long MAC address was accepted and the extra parts
  simply ignored.

- Setting an overly short MAC address for VFs was accepted and the
  missing part filled with random garbage.

While patch 1 makes sure that in the second case above missing parts are
padded with zero, patch 2 implements a real solution for both by
comparing new and old address lengths prior to accepting the input. For
VFs it is simply assumed that the length must match that of the PF's
address.

Phil Sutter (2):
  iplink: Add missing variable initialization
  iplink: Check address length via netlink

 ip/iplink.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 51 insertions(+), 3 deletions(-)

-- 
2.8.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-21 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 14:19 [iproute PATCH 0/2] Check MAC address length when changing it Phil Sutter
2016-06-16 14:19 ` [iproute PATCH 1/2] iplink: Add missing variable initialization Phil Sutter
2016-06-16 14:19 ` [iproute PATCH 2/2] iplink: Check address length via netlink Phil Sutter
2016-06-21 15:52 ` [iproute PATCH 0/2] Check MAC address length when changing it Stephen Hemminger

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).