[3.16.y-ckt stable] Patch "bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Dec 15 12:19:01 UTC 2014
This is a note to let you know that I have just added a patch titled
bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt3.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From d5197164692092d8199b5963204d825ffbdfccec Mon Sep 17 00:00:00 2001
From: Thomas Graf <tgraf at suug.ch>
Date: Thu, 27 Nov 2014 00:22:33 +0100
Subject: bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes
commit f6c6fda4c9e17940b0a2ba206b0408babfdc930c upstream.
Fixes: 7f28fa10 ("bonding: add arp_ip_target netlink support")
Reported-by: John Fastabend <john.fastabend at gmail.com>
Cc: Scott Feldman <sfeldma at cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf at suug.ch>
Acked-by: John Fastabend <john.r.fastabend at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/net/bonding/bond_netlink.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index 5ab3c1847e67..8626bc0cb2af 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -197,7 +197,12 @@ static int bond_changelink(struct net_device *bond_dev,
bond_option_arp_ip_targets_clear(bond);
nla_for_each_nested(attr, data[IFLA_BOND_ARP_IP_TARGET], rem) {
- __be32 target = nla_get_be32(attr);
+ __be32 target;
+
+ if (nla_len(attr) < sizeof(target))
+ return -EINVAL;
+
+ target = nla_get_be32(attr);
bond_opt_initval(&newval, (__force u64)target);
err = __bond_opt_set(bond, BOND_OPT_ARP_TARGETS,
--
2.1.3
More information about the kernel-team
mailing list