Eric Dumazet
cb9e5a0817
ipv6: fix uninit-value in ip6_multipath_l3_keys()
...
[ Upstream commit cea67a2dd6b2419dcc13a39309b9a79a1f773193 ]
syzbot/KMSAN reported an uninit-value in ip6_multipath_l3_keys(),
root caused to a bad assumption of ICMP header being already
pulled in skb->head
ip_multipath_l3_keys() does the correct thing, so it is an IPv6 only bug.
BUG: KMSAN: uninit-value in ip6_multipath_l3_keys net/ipv6/route.c:1830 [inline]
BUG: KMSAN: uninit-value in rt6_multipath_hash+0x5c4/0x640 net/ipv6/route.c:1858
CPU: 0 PID: 4507 Comm: syz-executor661 Not tainted 4.16.0+ #87
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:683
ip6_multipath_l3_keys net/ipv6/route.c:1830 [inline]
rt6_multipath_hash+0x5c4/0x640 net/ipv6/route.c:1858
ip6_route_input+0x65a/0x920 net/ipv6/route.c:1884
ip6_rcv_finish+0x413/0x6e0 net/ipv6/ip6_input.c:69
NF_HOOK include/linux/netfilter.h:288 [inline]
ipv6_rcv+0x1e16/0x2340 net/ipv6/ip6_input.c:208
__netif_receive_skb_core+0x47df/0x4a90 net/core/dev.c:4562
__netif_receive_skb net/core/dev.c:4627 [inline]
netif_receive_skb_internal+0x49d/0x630 net/core/dev.c:4701
netif_receive_skb+0x230/0x240 net/core/dev.c:4725
tun_rx_batched drivers/net/tun.c:1555 [inline]
tun_get_user+0x740f/0x7c60 drivers/net/tun.c:1962
tun_chr_write_iter+0x1d4/0x330 drivers/net/tun.c:1990
call_write_iter include/linux/fs.h:1782 [inline]
new_sync_write fs/read_write.c:469 [inline]
__vfs_write+0x7fb/0x9f0 fs/read_write.c:482
vfs_write+0x463/0x8d0 fs/read_write.c:544
SYSC_write+0x172/0x360 fs/read_write.c:589
SyS_write+0x55/0x80 fs/read_write.c:581
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Fixes: 23aebdacb05d ("ipv6: Compute multipath hash for ICMP errors from offending packet")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: Jakub Sitnicki <jkbs@redhat.com>
Acked-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-19 10:20:26 +02:00
..
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:30 +01:00
2017-11-02 11:10:55 +01:00
2018-04-12 12:32:24 +02:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:29 +02:00
2017-11-02 11:10:55 +01:00
2017-08-09 16:28:45 -07:00
2018-04-19 08:56:19 +02:00
2017-05-02 11:46:28 -04:00
2018-05-19 10:20:23 +02:00
2017-11-02 11:10:55 +01:00
2018-01-23 19:58:17 +01:00
2018-05-01 12:58:23 -07:00
2018-05-16 10:10:23 +02:00
2017-08-09 16:57:38 -07:00
2018-05-19 10:20:23 +02:00
2018-02-25 11:07:52 +01:00
2018-04-29 11:33:10 +02:00
2018-04-24 09:36:39 +02:00
2017-06-16 11:48:40 -04:00
2017-08-22 13:40:23 -07:00
2018-03-31 18:10:40 +02:00
2018-04-29 11:33:13 +02:00
2018-05-19 10:20:25 +02:00
2018-05-19 10:20:26 +02:00
2017-11-02 11:10:55 +01:00
2018-03-31 18:10:41 +02:00
2018-05-16 10:10:23 +02:00
2018-01-23 19:58:12 +01:00
2018-04-29 11:33:11 +02:00
2017-07-04 22:35:16 +01:00
2018-05-19 10:20:23 +02:00
2018-04-12 12:32:15 +02:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:28 +01:00
2017-10-21 01:56:38 +01:00
2018-05-16 10:10:22 +02:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:23 +02:00
2017-07-04 22:35:17 +01:00
2017-11-30 08:40:55 +00:00
2017-08-29 15:16:52 -07:00
2018-05-19 10:20:24 +02:00
2018-04-29 11:33:12 +02:00
2017-11-02 11:10:55 +01:00
2017-11-01 12:19:03 +09:00
2017-11-08 14:32:18 +09:00
2018-05-19 10:20:25 +02:00
2018-05-16 10:10:26 +02:00
2018-04-26 11:02:19 +02:00
2018-05-19 10:20:26 +02:00
2018-05-19 10:20:25 +02:00
2018-04-29 11:33:11 +02:00
2018-04-29 11:33:13 +02:00
2018-04-26 11:02:19 +02:00
2017-08-07 14:48:48 -07:00
2018-04-29 11:33:12 +02:00
2018-05-19 10:20:24 +02:00
2017-11-02 10:04:46 -07:00
2018-02-25 11:07:59 +01:00
2017-11-02 11:10:55 +01:00
2018-03-03 10:24:34 +01:00
2017-11-02 11:10:55 +01:00
2018-04-08 14:26:29 +02:00
2018-05-19 10:20:24 +02:00
2017-09-04 13:25:20 +02:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:23 +01:00
2017-04-16 23:42:49 -05:00