bonding: fix length of actor system
authorTobias Jungel <tobias.jungel@gmail.com>
Sun, 28 Oct 2018 11:54:10 +0000 (12:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Nov 2018 15:42:59 +0000 (07:42 -0800)
commit210c21f1ffe1d07dbb2ea2f874923b3b1959a6c2
treed1161b7cf47acc4be71799a9ffe0c6216da26be8
parentf0223d1f78f50770b4455c106b96c820fd45f1f7
bonding: fix length of actor system

[ Upstream commit 414dd6fb9a1a1b59983aea7bf0f79f0085ecc5b8 ]

The attribute IFLA_BOND_AD_ACTOR_SYSTEM is sent to user space having the
length of sizeof(bond->params.ad_actor_system) which is 8 byte. This
patch aligns the length to ETH_ALEN to have the same MAC address exposed
as using sysfs.

Fixes: f87fda00b6ed2 ("bonding: prevent out of bound accesses")
Signed-off-by: Tobias Jungel <tobias.jungel@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_netlink.c