Eric Dumazet
d0ea2b1250
ipv4: fix uninit-value in ip_route_output_key_hash_rcu()
syzbot complained that res.type could be used while not initialized.
Using RTN_UNSPEC as initial value seems better than using garbage.
BUG: KMSAN: uninit-value in __mkroute_output net/ipv4/route.c:2200 [inline]
BUG: KMSAN: uninit-value in ip_route_output_key_hash_rcu+0x31f0/0x3940 net/ipv4/route.c:2493
CPU: 1 PID: 12207 Comm: syz-executor0 Not tainted 4.16.0+ #81
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:53
kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
__msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676
__mkroute_output net/ipv4/route.c:2200 [inline]
ip_route_output_key_hash_rcu+0x31f0/0x3940 net/ipv4/route.c:2493
ip_route_output_key_hash net/ipv4/route.c:2322 [inline]
__ip_route_output_key include/net/route.h:126 [inline]
ip_route_output_flow+0x1eb/0x3c0 net/ipv4/route.c:2577
raw_sendmsg+0x1861/0x3ed0 net/ipv4/raw.c:653
inet_sendmsg+0x48d/0x740 net/ipv4/af_inet.c:764
sock_sendmsg_nosec net/socket.c:630 [inline]
sock_sendmsg net/socket.c:640 [inline]
SYSC_sendto+0x6c3/0x7e0 net/socket.c:1747
SyS_sendto+0x8a/0xb0 net/socket.c:1715
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x455259
RSP: 002b:00007fdc0625dc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007fdc0625e6d4 RCX: 0000000000455259
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000020000080 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000004f7 R14: 00000000006fa7c8 R15: 0000000000000000
Local variable description: ----res.i.i@ip_route_output_flow
Variable was created at:
ip_route_output_flow+0x75/0x3c0 net/ipv4/route.c:2576
raw_sendmsg+0x1861/0x3ed0 net/ipv4/raw.c:653
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-07 22:32:31 -04:00
..
2018-04-01 19:49:34 -04:00
2018-03-31 23:33:04 -04:00
2017-11-03 22:11:17 +08:00
2018-04-05 22:05:03 -04:00
2017-10-21 01:33:19 +01:00
2015-07-29 22:44:04 -07:00
2018-03-27 13:18:09 -04:00
2018-02-27 10:46:01 +01:00
2018-02-13 13:59:03 +01:00
2018-03-27 13:18:09 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-02-28 22:44:44 -05:00
2018-04-01 20:57:39 -04:00
2018-03-29 14:10:30 -04:00
2018-03-27 13:18:09 -04:00
2016-06-30 05:03:36 -04:00
2017-10-08 10:12:15 -07:00
2018-03-27 13:18:09 -04:00
2018-03-27 13:18:09 -04:00
2018-02-02 19:49:31 -05:00
2018-03-12 11:03:42 -04:00
2018-03-31 23:25:39 -04:00
2018-02-01 09:48:42 -05:00
2018-01-15 14:23:42 -05:00
2018-02-26 15:11:48 -05:00
2018-03-04 17:49:17 -05:00
2018-04-04 12:04:59 -04:00
2018-03-27 13:18:09 -04:00
2018-03-22 15:12:56 -04:00
2017-11-02 11:10:55 +01:00
2018-04-04 11:53:08 -04:00
2018-03-22 15:12:56 -04:00
2017-06-25 11:42:01 -04:00
2018-04-05 15:16:15 -04:00
2018-03-27 13:18:09 -04:00
2015-04-03 12:11:15 -04:00
2018-03-26 12:07:48 -04:00
2018-03-27 13:18:09 -04:00
2018-03-26 13:14:43 -04:00
2018-03-27 13:18:09 -04:00
2018-03-01 13:13:23 -05:00
2018-03-01 13:13:23 -05:00
2018-01-08 18:11:02 +01:00
2018-03-27 13:18:09 -04:00
2018-03-31 23:25:39 -04:00
2017-03-24 13:17:07 -07:00
2017-08-07 11:39:22 -07:00
2018-03-27 13:18:09 -04:00
2018-04-07 22:32:31 -04:00
2018-03-25 20:53:54 -04:00
2018-03-27 13:18:09 -04:00
2018-03-16 15:07:48 -04:00
2017-08-06 21:25:10 -07:00
2017-10-16 21:24:25 +01:00
2017-11-15 14:09:52 +09:00
2017-08-06 21:25:10 -07:00
2016-12-06 11:34:24 -05:00
2017-12-20 14:00:25 -05:00
2017-12-13 15:51:12 -05:00
2017-08-06 21:25:10 -07:00
2017-08-06 21:25:10 -07:00
2016-11-21 13:20:17 -05:00
2018-02-28 12:03:47 -05:00
2018-04-01 19:49:34 -04:00
2018-03-31 23:33:04 -04:00
2017-05-17 16:06:01 -04:00
2018-03-27 13:18:09 -04:00
2018-03-31 23:37:32 -04:00
2018-01-31 10:26:30 -05:00
2018-01-22 16:01:30 -05:00
2018-03-01 21:44:28 -05:00
2017-12-08 10:07:02 -05:00
2017-12-08 14:14:11 -05:00
2017-08-06 21:25:10 -07:00
2018-03-07 15:01:03 -05:00
2018-02-06 11:39:31 +01:00
2017-09-29 06:07:00 +01:00
2017-11-02 11:10:55 +01:00
2017-08-06 21:25:10 -07:00
2017-08-30 11:20:08 -07:00
2017-08-06 21:25:10 -07:00
2018-03-30 00:09:43 +02:00
2018-02-28 11:43:28 -05:00
2017-08-07 11:39:22 -07:00
2017-11-02 11:10:55 +01:00
2018-01-22 16:01:30 -05:00
2017-07-24 13:52:59 -07:00
2018-03-31 23:33:04 -04:00
2018-03-27 13:18:09 -04:00
2017-12-19 08:23:21 +01:00
2017-06-16 11:48:39 -04:00
2017-04-14 10:07:39 +02:00
2018-03-07 10:54:29 +01:00
2018-03-04 17:49:17 -05:00
2018-03-27 13:18:09 -04:00
2017-02-09 10:22:17 +01:00
2017-11-02 11:10:55 +01:00