]> git.baikalelectronics.ru Git - kernel.git/commit
net: ip_gre: Accept IFLA_INFO_DATA-less configuration
authorPetr Machata <petrm@mellanox.com>
Mon, 16 Mar 2020 17:53:00 +0000 (19:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:46 +0000 (11:01 +0200)
commitc4faec492829d6918c9c8ccd077d7741145f48f6
treef1c5f88b92f81f8d353c1c3ee596d27298930f99
parentc03cbdce0f8fa133e011daca4ab31955dc7c047f
net: ip_gre: Accept IFLA_INFO_DATA-less configuration

[ Upstream commit a083ff9df7f245f59fcb1cff0bad4aef4e5103f2 ]

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: 0da2860deb19 ("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>
net/ipv4/ip_gre.c