Commit b23bd715 authored by Tobias Jungel's avatar Tobias Jungel Committed by Kleber Sacilotto de Souza

bonding: fix length of actor system

BugLink: https://bugs.launchpad.net/bugs/1878232

commit 414dd6fb upstream.

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: f87fda00 ("bonding: prevent out of bound accesses")
Signed-off-by: default avatarTobias Jungel <tobias.jungel@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent b773e274
...@@ -628,8 +628,7 @@ static int bond_fill_info(struct sk_buff *skb, ...@@ -628,8 +628,7 @@ static int bond_fill_info(struct sk_buff *skb,
goto nla_put_failure; goto nla_put_failure;
if (nla_put(skb, IFLA_BOND_AD_ACTOR_SYSTEM, if (nla_put(skb, IFLA_BOND_AD_ACTOR_SYSTEM,
sizeof(bond->params.ad_actor_system), ETH_ALEN, &bond->params.ad_actor_system))
&bond->params.ad_actor_system))
goto nla_put_failure; goto nla_put_failure;
} }
if (!bond_3ad_get_active_agg_info(bond, &info)) { if (!bond_3ad_get_active_agg_info(bond, &info)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment