David Ahern
e55449e71a
ipv6: Initialize fib6_result in bpf_ipv6_fib_lookup
fib6_result is not initialized in bpf_ipv6_fib_lookup and potentially
passses garbage to the fib lookup which triggers a KASAN warning:
[ 262.055450] ==================================================================
[ 262.057640] BUG: KASAN: user-memory-access in fib6_rule_suppress+0x4b/0xce
[ 262.059488] Read of size 8 at addr 00000a20000000b0 by task swapper/1/0
[ 262.061238]
[ 262.061673] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.1.0-rc5+ #56
[ 262.063493] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1 04/01/2014
[ 262.065593] Call Trace:
[ 262.066277] <IRQ>
[ 262.066848] dump_stack+0x7e/0xbb
[ 262.067764] kasan_report+0x18b/0x1b5
[ 262.069921] __asan_load8+0x7f/0x81
[ 262.070879] fib6_rule_suppress+0x4b/0xce
[ 262.071980] fib_rules_lookup+0x275/0x2cd
[ 262.073090] fib6_lookup+0x119/0x218
[ 262.076457] bpf_ipv6_fib_lookup+0x39d/0x664
...
Initialize fib6_result to 0.
Fixes: b1d4099150 ("ipv6: Rename fib6_multipath_select and pass fib6_result")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-26 11:32:00 -04:00
..
2019-04-23 19:09:58 +02:00
2019-03-13 11:50:04 +01:00
2019-04-19 13:58:17 -07:00
2019-04-19 14:07:40 -07:00
2019-04-19 14:07:40 -07:00
2019-04-21 10:37:26 -07:00
2019-04-05 14:14:19 -07:00
2019-04-25 06:18:07 -07:00
2019-04-12 00:53:00 +02:00
2019-02-23 13:34:40 -08:00
2019-04-25 23:52:29 -04:00
2019-04-10 12:20:46 -07:00
2019-04-19 14:07:40 -07:00
2019-03-25 22:28:07 +01:00
2019-04-26 11:32:00 -04:00
2019-04-19 14:07:40 -07:00
2019-04-22 21:47:25 -07:00
2019-04-11 14:01:08 -07:00
2019-04-05 14:14:19 -07:00
2019-02-22 12:55:31 -08:00
2019-04-15 17:22:02 -07:00
2019-04-19 14:07:40 -07:00
2019-04-25 23:52:29 -04:00
2019-04-25 23:52:29 -04:00
2019-04-01 14:59:20 -07:00
2019-02-12 10:36:42 +01:00
2019-04-19 14:07:40 -07:00
2019-04-12 10:25:03 -07:00
2019-04-17 11:26:25 -07:00
2019-04-22 21:47:25 -07:00
2019-04-25 23:52:29 -04:00
2019-04-25 23:52:29 -04:00
2019-03-22 10:38:23 -04:00
2019-04-17 11:26:25 -07:00
2019-04-19 14:07:40 -07:00
2019-04-08 23:39:36 -07:00
2019-04-08 23:02:52 +02:00
2019-04-19 14:07:40 -07:00
2019-02-21 16:23:56 -08:00
2019-04-19 14:07:40 -07:00
2019-04-24 12:07:08 -07:00
2019-04-25 23:52:29 -04:00
2019-04-25 23:52:29 -04:00
2019-04-24 11:53:28 -07:00
2019-04-19 14:07:40 -07:00
2019-04-17 11:26:25 -07:00
2019-04-22 21:50:54 -07:00
2019-04-23 13:40:55 -07:00
2019-03-01 21:35:19 -08:00
2019-04-24 11:46:54 -07:00
2019-04-25 23:52:29 -04:00
2019-04-08 09:51:54 -07:00
2019-03-08 15:15:44 -08:00
2019-03-22 10:38:23 -04:00
2019-04-17 11:26:25 -07:00
2019-04-19 14:07:40 -07:00
2019-04-16 20:13:10 -07:00
2019-03-20 11:18:54 -07:00
2019-04-19 14:07:40 -07:00
2019-03-24 14:55:31 -04:00
2019-02-28 08:24:23 -07:00
2019-04-26 11:28:47 -04:00