mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
net: ip_gre: Accept IFLA_INFO_DATA-less configuration
[ Upstream commit32ca98feab
] The fix referenced below causes a crash when an ERSPAN tunnel is created without passing IFLA_INFO_DATA. Fix by validating passed-in data in the same way as ipgre does. Fixes:e1f8f78ffe
("net: ip_gre: Separate ERSPAN newlink / changelink callbacks") Reported-by: syzbot+1b4ebf4dae4e510dd219@syzkaller.appspotmail.com Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
54266b2694
commit
f5ebb2dd86
1 changed files with 2 additions and 0 deletions
|
@ -1241,6 +1241,8 @@ static int erspan_netlink_parms(struct net_device *dev,
|
|||
err = ipgre_netlink_parms(dev, data, tb, parms, fwmark);
|
||||
if (err)
|
||||
return err;
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
if (data[IFLA_GRE_ERSPAN_VER]) {
|
||||
t->erspan_ver = nla_get_u8(data[IFLA_GRE_ERSPAN_VER]);
|
||||
|
|
Loading…
Reference in a new issue