Prashant Bhole
af066ed3d4
rtnetlink: Fix null-ptr-deref in rtnl_newlink
In rtnl_newlink(), NULL check is performed on m_ops however member of
ops is accessed. Fixed by accessing member of m_ops instead of ops.
[ 345.432629] BUG: KASAN: null-ptr-deref in rtnl_newlink+0x400/0x1110
[ 345.432629] Read of size 4 at addr 0000000000000088 by task ip/986
[ 345.432629]
[ 345.432629] CPU: 1 PID: 986 Comm: ip Not tainted 4.17.0-rc6+ #9
[ 345.432629] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
[ 345.432629] Call Trace:
[ 345.432629] dump_stack+0xc6/0x150
[ 345.432629] ? dump_stack_print_info.cold.0+0x1b/0x1b
[ 345.432629] ? kasan_report+0xb4/0x410
[ 345.432629] kasan_report.cold.4+0x8f/0x91
[ 345.432629] ? rtnl_newlink+0x400/0x1110
[ 345.432629] rtnl_newlink+0x400/0x1110
[...]
Fixes: ccf8dbcd062a ("rtnetlink: Remove VLA usage")
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Tested-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-01 10:39:24 -04:00
..
2018-02-11 14:34:03 -08:00
2018-04-19 12:58:20 -04:00
2018-03-07 15:12:58 -05:00
2018-05-21 16:01:54 -04:00
2018-05-29 09:53:38 -04:00
2017-11-21 15:57:07 -08:00
2018-03-05 12:52:45 -05:00
2018-04-17 23:41:16 -04:00
2018-05-04 09:58:56 -04:00
2018-05-28 22:59:54 -04:00
2018-03-29 14:10:30 -04:00
2018-04-25 13:26:12 -04:00
2018-05-24 22:20:51 -04:00
2018-05-08 00:02:41 -04:00
2018-02-23 12:35:46 -05:00
2017-12-08 13:32:26 -05:00
2017-11-02 11:10:55 +01:00
2016-05-25 12:35:09 -07:00
2018-01-23 19:43:30 -05:00
2017-09-26 13:36:44 -07:00
2017-08-07 14:16:22 -07:00
2018-05-28 22:59:54 -04:00
2018-04-25 13:19:59 -04:00
2018-03-31 22:24:58 -04:00
2018-03-27 13:18:09 -04:00
2018-03-26 12:07:48 -04:00
2017-11-02 11:10:55 +01:00
2018-05-24 23:01:15 -04:00
2017-07-21 11:14:51 -04:00
2015-05-31 00:03:21 -07:00
2017-11-08 11:13:54 +01:00
2017-12-13 13:18:46 -05:00
2018-04-17 10:50:29 -04:00
2018-03-27 13:18:09 -04:00
2015-11-03 11:08:22 -05:00
2016-12-29 11:38:31 -05:00
2018-06-01 10:39:24 -04:00
2017-03-02 08:42:29 +01:00
2017-06-08 10:53:29 -04:00
2018-05-01 09:42:46 -04:00
2018-03-27 13:18:09 -04:00
2018-02-02 19:47:03 -05:00
2018-05-21 16:01:54 -04:00
2018-02-11 14:34:03 -08:00
2018-04-05 21:36:27 -07:00
2015-07-09 14:17:15 -07:00
2017-11-02 11:10:55 +01:00
2018-03-26 08:53:43 -06:00
2018-05-24 18:36:15 -07:00