Alexey Kodanev
6689f83586
vti: fix use after free in vti_tunnel_xmit/vti6_tnl_xmit
...
[ Upstream commit 36f6ee22d2
]
When running LTP IPsec tests, KASan might report:
BUG: KASAN: use-after-free in vti_tunnel_xmit+0xeee/0xff0 [ip_vti]
Read of size 4 at addr ffff880dc6ad1980 by task swapper/0/0
...
Call Trace:
<IRQ>
dump_stack+0x63/0x89
print_address_description+0x7c/0x290
kasan_report+0x28d/0x370
? vti_tunnel_xmit+0xeee/0xff0 [ip_vti]
__asan_report_load4_noabort+0x19/0x20
vti_tunnel_xmit+0xeee/0xff0 [ip_vti]
? vti_init_net+0x190/0x190 [ip_vti]
? save_stack_trace+0x1b/0x20
? save_stack+0x46/0xd0
dev_hard_start_xmit+0x147/0x510
? icmp_echo.part.24+0x1f0/0x210
__dev_queue_xmit+0x1394/0x1c60
...
Freed by task 0:
save_stack_trace+0x1b/0x20
save_stack+0x46/0xd0
kasan_slab_free+0x70/0xc0
kmem_cache_free+0x81/0x1e0
kfree_skbmem+0xb1/0xe0
kfree_skb+0x75/0x170
kfree_skb_list+0x3e/0x60
__dev_queue_xmit+0x1298/0x1c60
dev_queue_xmit+0x10/0x20
neigh_resolve_output+0x3a8/0x740
ip_finish_output2+0x5c0/0xe70
ip_finish_output+0x4ba/0x680
ip_output+0x1c1/0x3a0
xfrm_output_resume+0xc65/0x13d0
xfrm_output+0x1e4/0x380
xfrm4_output_finish+0x5c/0x70
Can be fixed if we get skb->len before dst_output().
Fixes: b9959fd3b0
("vti: switch to new ip tunnel code")
Fixes: 22e1b23daf
("vti6: Support inter address family tunneling.")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-10-12 11:51:22 +02:00
..
2017-10-08 10:26:09 +02:00
2017-08-12 19:31:22 -07:00
2015-08-25 13:38:50 -07:00
2017-06-17 06:41:50 +02:00
2017-02-18 15:11:41 +01:00
2015-07-29 22:44:04 -07:00
2016-09-01 15:18:08 -07:00
2016-11-30 11:09:39 +01:00
2017-08-11 08:49:32 -07:00
2015-07-24 22:46:11 -07:00
2016-09-28 04:48:00 -04:00
2017-08-30 10:21:39 +02:00
2017-06-07 12:07:44 +02:00
2016-10-20 14:32:22 -04:00
2016-06-30 05:03:36 -04:00
2016-10-20 14:32:22 -04:00
2016-11-09 18:49:39 -05:00
2017-08-12 19:31:22 -07:00
2017-06-07 12:07:42 +02:00
2016-09-08 16:13:09 -07:00
2017-09-20 08:19:55 +02:00
2016-10-17 10:17:05 -04:00
2016-07-07 10:35:06 +02:00
2015-08-28 13:32:36 -07:00
2016-11-03 16:10:26 -04:00
2017-09-20 08:19:55 +02:00
2016-09-10 20:53:55 -07:00
2016-09-16 04:24:07 -04:00
2016-03-01 17:18:44 -05:00
2017-08-12 19:31:22 -07:00
2017-05-03 08:36:36 -07:00
2017-02-04 09:47:11 +01:00
2017-09-20 08:19:56 +02:00
2017-10-12 11:51:22 +02:00
2015-04-03 12:11:15 -04:00
2016-08-22 21:04:41 -07:00
2016-09-17 10:13:07 -04:00
2016-11-03 16:10:26 -04:00
2016-11-28 12:15:00 -05:00
2016-09-21 00:23:01 -04:00
2017-07-05 14:40:28 +02:00
2017-05-03 08:36:34 -07:00
2016-09-30 01:50:45 -04:00
2017-05-14 14:00:21 +02:00
2017-08-30 10:21:40 +02:00
2017-08-11 08:49:32 -07:00
2017-08-11 08:49:35 -07:00
2017-08-11 08:49:32 -07:00
2016-05-11 14:43:19 -04:00
2016-09-21 00:22:59 -04:00
2017-06-14 15:05:52 +02:00
2016-05-11 14:43:19 -04:00
2016-10-31 15:16:28 -04:00
2016-08-23 23:11:36 -07:00
2017-02-04 09:47:10 +01:00
2015-07-09 14:22:52 -07:00
2016-05-11 14:43:19 -04:00
2015-07-09 14:22:52 -07:00
2016-05-11 14:43:19 -04:00
2017-08-30 10:21:42 +02:00
2017-03-22 12:43:34 +01:00
2017-05-14 14:00:21 +02:00
2016-09-01 14:09:01 -07:00
2017-05-14 14:00:21 +02:00
2016-06-10 23:07:49 -07:00
2016-09-19 20:59:34 -04:00
2017-10-12 11:51:21 +02:00
2017-06-17 06:41:49 +02:00
2016-09-21 00:23:00 -04:00
2016-05-02 17:02:25 -04:00
2015-07-09 14:22:52 -07:00
2017-08-12 19:31:21 -07:00
2016-05-11 14:43:19 -04:00
2016-05-11 14:43:19 -04:00
2016-05-11 14:43:19 -04:00
2016-05-11 14:43:19 -04:00
2016-09-08 17:16:12 -07:00
2017-09-20 08:19:55 +02:00
2016-07-11 13:27:06 -07:00
2016-09-08 16:13:09 -07:00
2016-11-24 15:32:14 -05:00
2017-10-08 10:26:08 +02:00
2016-06-17 20:23:32 -07:00
2017-08-12 19:31:22 -07:00
2016-11-24 15:32:14 -05:00
2015-09-17 17:18:37 -07:00
2015-03-25 14:07:04 -04:00
2015-10-24 06:54:12 -07:00
2016-09-12 15:52:44 -07:00