Taehee Yoo
b61d327cd3
net: validate lwtstate->data before returning from skb_tunnel_info()
...
commit 67a9c94317 upstream.
skb_tunnel_info() returns pointer of lwtstate->data as ip_tunnel_info
type without validation. lwtstate->data can have various types such as
mpls_iptunnel_encap, etc and these are not compatible.
So skb_tunnel_info() should validate before returning that pointer.
Splat looks like:
BUG: KASAN: slab-out-of-bounds in vxlan_get_route+0x418/0x4b0 [vxlan]
Read of size 2 at addr ffff888106ec2698 by task ping/811
CPU: 1 PID: 811 Comm: ping Not tainted 5.13.0+ #1195
Call Trace:
dump_stack_lvl+0x56/0x7b
print_address_description.constprop.8.cold.13+0x13/0x2ee
? vxlan_get_route+0x418/0x4b0 [vxlan]
? vxlan_get_route+0x418/0x4b0 [vxlan]
kasan_report.cold.14+0x83/0xdf
? vxlan_get_route+0x418/0x4b0 [vxlan]
vxlan_get_route+0x418/0x4b0 [vxlan]
[ ... ]
vxlan_xmit_one+0x148b/0x32b0 [vxlan]
[ ... ]
vxlan_xmit+0x25c5/0x4780 [vxlan]
[ ... ]
dev_hard_start_xmit+0x1ae/0x6e0
__dev_queue_xmit+0x1f39/0x31a0
[ ... ]
neigh_xmit+0x2f9/0x940
mpls_xmit+0x911/0x1600 [mpls_iptunnel]
lwtunnel_xmit+0x18f/0x450
ip_finish_output2+0x867/0x2040
[ ... ]
Fixes: 61adedf3e3 ("route: move lwtunnel state to dst_entry")
Signed-off-by: Taehee Yoo <ap420073@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-07-28 09:14:26 +02:00
..
2015-04-11 22:28:27 -04:00
2021-05-22 10:40:20 +02:00
2021-06-10 12:42:36 +02:00
2014-12-10 15:33:16 -05:00
2015-09-21 16:03:04 -07:00
2020-09-12 11:47:33 +02:00
2019-08-25 10:51:42 +02:00
2021-06-03 08:23:27 +02:00
2019-03-23 13:19:44 +01:00
2020-06-30 15:38:39 -04:00
2018-08-24 13:12:37 +02:00
2016-06-15 20:41:22 -07:00
2020-06-03 08:16:25 +02:00
2020-08-21 11:01:55 +02:00
2015-09-17 13:20:05 +02:00
2016-09-08 11:10:12 +01:00
2016-09-04 13:29:29 -07:00
2018-08-22 07:47:13 +02:00
2014-09-18 10:54:36 +02:00
2019-06-11 12:22:49 +02:00
2019-02-23 09:05:59 +01:00
2016-02-09 04:45:49 -05:00
2014-11-10 13:27:49 -05:00
2015-07-27 01:05:24 -07:00
2020-12-11 13:37:57 +01:00
2015-11-18 16:17:38 -05:00
2016-06-27 15:06:17 -04:00
2021-06-03 08:23:28 +02:00
2016-07-08 12:20:57 +02:00
2016-03-13 15:01:00 -04:00
2017-02-18 15:11:41 +01:00
2016-04-19 20:09:25 -04:00
2016-04-25 16:44:27 -04:00
2016-06-25 12:19:35 -04:00
2016-04-25 16:44:27 -04:00
2016-06-09 23:41:03 -07:00
2014-02-09 17:32:50 -08:00
2013-12-06 12:37:56 -05:00
2015-03-06 21:50:02 -05:00
2016-08-26 11:55:18 -07:00
2013-12-10 21:50:00 -05:00
2013-09-20 14:49:32 -04:00
2015-09-17 17:18:37 -07:00
2013-09-20 14:49:32 -04:00
2014-02-09 17:32:49 -08:00
2014-02-09 17:32:49 -08:00
2016-09-23 08:38:50 -04:00
2016-02-16 20:21:48 -05:00
2021-07-28 09:14:26 +02:00
2015-10-08 04:27:02 -07:00
2020-07-22 09:10:48 +02:00
2013-11-07 19:28:58 -05:00
2015-09-23 15:33:15 -07:00
2020-03-20 09:07:39 +01:00
2020-03-11 07:53:05 +01:00
2016-09-10 23:12:53 -07:00
2014-02-12 07:02:11 +01:00
2016-05-20 18:03:16 -04:00
2019-11-10 11:23:31 +01:00
2019-11-10 11:23:31 +01:00
2013-09-20 14:49:33 -04:00
2016-06-07 16:37:14 -07:00
2020-07-22 09:10:48 +02:00
2016-06-17 20:23:32 -07:00
2016-08-18 01:17:32 -04:00
2019-03-19 13:14:10 +01:00
2016-07-25 17:55:43 -07:00
2014-11-05 16:30:03 -05:00
2016-03-14 12:19:46 -04:00
2021-03-03 17:44:46 +01:00
2016-09-12 11:45:45 +02:00
2016-01-04 20:40:41 +01:00
2016-10-14 10:59:15 -04:00
2015-12-15 23:25:20 -05:00
2016-03-22 15:45:44 -04:00
2016-04-04 22:11:20 -04:00
2016-05-20 18:03:17 -04:00
2020-09-12 11:47:38 +02:00
2020-12-11 13:37:58 +01:00
2019-05-02 09:32:06 +02:00
2020-01-04 13:41:12 +01:00
2018-10-18 09:13:23 +02:00
2018-05-16 10:08:41 +02:00
2019-02-23 09:05:59 +01:00
2016-03-13 23:55:13 -04:00
2017-09-20 08:19:53 +02:00
2021-07-28 09:14:25 +02:00
2019-07-21 09:05:57 +02:00
2019-01-31 08:12:33 +01:00
2016-09-17 10:13:07 -04:00
2019-11-12 19:15:57 +01:00
2020-10-29 09:05:31 +01:00
2019-09-16 08:19:33 +02:00
2020-05-20 08:15:30 +02:00
2014-11-24 04:28:49 -05:00
2017-08-11 08:49:34 -07:00
2016-08-17 19:36:23 -04:00
2019-02-06 17:33:27 +01:00
2013-09-21 14:01:38 -04:00
2014-10-14 02:18:27 +02:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2019-11-06 12:18:24 +01:00
2013-09-21 14:01:38 -04:00
2014-01-01 22:22:43 -05:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-12-10 15:21:24 -05:00
2013-09-21 14:01:38 -04:00
2019-11-25 09:52:18 +01:00
2017-02-18 15:11:42 +01:00
2018-05-30 07:50:28 +02:00
2016-07-08 13:23:12 +02:00
2013-12-06 12:37:56 -05:00
2014-09-22 16:23:15 -04:00
2015-10-23 06:26:42 -07:00
2016-10-03 02:00:22 -04:00
2013-10-01 17:06:14 -04:00
2016-10-04 02:11:51 -04:00
2016-06-15 20:41:23 -07:00
2020-01-12 11:24:19 +01:00
2019-04-17 08:36:46 +02:00
2016-07-05 09:06:29 -07:00
2016-06-27 15:06:18 -04:00
2017-10-12 11:51:25 +02:00
2015-12-08 22:02:33 -05:00
2013-09-21 14:01:39 -04:00
2018-05-16 10:08:41 +02:00
2016-07-08 12:20:57 +02:00
2013-09-21 14:01:39 -04:00
2016-03-23 22:09:58 -04:00
2016-09-28 05:02:44 -04:00
2016-08-10 17:19:02 -07:00
2016-08-15 10:55:53 -07:00
2016-04-07 16:53:30 -04:00
2013-09-23 01:51:08 -04:00
2016-02-11 03:54:14 -05:00
2013-09-23 01:51:08 -04:00
2021-04-16 11:59:07 +02:00
2018-05-30 07:50:30 +02:00
2016-04-04 22:11:19 -04:00
2013-09-23 01:51:08 -04:00
2018-05-30 07:50:36 +02:00
2021-03-30 14:41:42 +02:00
2019-11-06 12:18:25 +01:00
2016-02-08 10:30:42 -05:00
2014-06-02 11:00:41 -07:00
2018-04-20 08:21:07 +02:00
2016-04-28 11:49:45 -04:00
2016-01-19 14:44:23 -05:00
2021-06-30 08:49:20 -04:00
2013-12-19 18:51:20 -05:00
2013-09-23 01:51:09 -04:00
2016-08-28 23:32:41 -04:00
2016-09-28 04:48:00 -04:00
2015-03-12 22:58:12 -04:00
2020-05-02 17:23:08 +02:00
2015-07-09 15:12:20 -07:00
2016-05-03 16:08:14 -04:00
2015-10-26 22:24:22 -07:00
2016-06-17 20:23:32 -07:00
2016-10-20 14:45:52 -04:00
2018-03-11 16:21:32 +01:00
2017-07-21 07:42:18 +02:00
2013-09-23 16:29:40 -04:00
2014-09-05 17:35:28 -07:00
2018-04-13 19:48:00 +02:00
2020-10-14 09:48:16 +02:00