提交 019b13ae 编写于 作者: M Matthias Schiffer 提交者: David S. Miller

vxlan: fix incorrect nlattr access in MTU check

The access to the wrong variable could lead to a NULL dereference and
possibly other invalid memory reads in vxlan newlink/changelink requests
with a IFLA_MTU attribute.

Fixes: a985343b "vxlan: refactor verification and application of configuration"
Signed-off-by: NMatthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c017ce0a
......@@ -2727,7 +2727,7 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],
}
if (tb[IFLA_MTU]) {
u32 mtu = nla_get_u32(data[IFLA_MTU]);
u32 mtu = nla_get_u32(tb[IFLA_MTU]);
if (mtu < ETH_MIN_MTU || mtu > ETH_MAX_MTU)
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册