This is a note to let you know that I've just added the patch titled macvlan: validate flags to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: macvlan-validate-flags.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From aed1b93c979b14cc55e605e040722c300f81f444 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" <mst@xxxxxxxxxx> Date: Mon, 5 Aug 2013 18:25:54 +0300 Subject: macvlan: validate flags From: "Michael S. Tsirkin" <mst@xxxxxxxxxx> [ Upstream commit 1512747820367c8b3b8b72035f0f78c62f2bf1e9 ] commit df8ef8f3aaa6692970a436204c4429210addb23a macvlan: add FDB bridge ops and macvlan flags added a flags field to macvlan, which can be controlled from userspace. The idea is to make the interface future-proof so we can add flags and not new fields. However, flags value isn't validated, as a result, userspace can't detect which flags are supported. Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: John Fastabend <john.r.fastabend@xxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/macvlan.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -727,6 +727,10 @@ static int macvlan_validate(struct nlatt return -EADDRNOTAVAIL; } + if (data && data[IFLA_MACVLAN_FLAGS] && + nla_get_u16(data[IFLA_MACVLAN_FLAGS]) & ~MACVLAN_FLAG_NOPROMISC) + return -EINVAL; + if (data && data[IFLA_MACVLAN_MODE]) { switch (nla_get_u32(data[IFLA_MACVLAN_MODE])) { case MACVLAN_MODE_PRIVATE: Patches currently in stable-queue which might be from mst@xxxxxxxxxx are queue-3.10/tun-signedness-bug-in-tun_get_user.patch queue-3.10/macvlan-validate-flags.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html