syzbot


KMSAN: uninit-value in __xfrm_decode_session (3)

Status: auto-closed as invalid on 2020/10/20 16:12
Subsystems: net
[Documentation on labels]
First crash: 1409d, last: 1409d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in __xfrm_decode_session (2) net 6 1589d 1663d 0/26 auto-closed as invalid on 2020/04/24 09:27
upstream KASAN: slab-out-of-bounds Read in __xfrm_decode_session (2) net 7 908d 1145d 0/26 auto-closed as invalid on 2022/04/04 17:22
upstream KMSAN: kernel-infoleak in copyout (2) net C 6723 359d 1527d 22/26 fixed on 2023/06/08 14:41
upstream KMSAN: uninit-value in __xfrm_decode_session net 1 1707d 1706d 0/26 closed as invalid on 2019/10/08 12:18
upstream KMSAN: kernel-infoleak in _copy_to_iter (7) net C 138977 463d 815d 22/26 fixed on 2023/02/24 13:50
upstream KMSAN: uninit-value in __xfrm_decode_session (4) net C 8 223d 269d 0/26 closed as invalid on 2023/12/14 11:46

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in decode_session6 net/xfrm/xfrm_policy.c:3406 [inline]
BUG: KMSAN: uninit-value in __xfrm_decode_session+0x12ea/0x3450 net/xfrm/xfrm_policy.c:3481
CPU: 0 PID: 18153 Comm: syz-executor.0 Not tainted 5.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1df/0x240 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
 decode_session6 net/xfrm/xfrm_policy.c:3406 [inline]
 __xfrm_decode_session+0x12ea/0x3450 net/xfrm/xfrm_policy.c:3481
 xfrm_decode_session_reverse include/net/xfrm.h:1141 [inline]
 icmpv6_route_lookup net/ipv6/icmp.c:388 [inline]
 icmp6_send+0x35b2/0x3a00 net/ipv6/icmp.c:588
 icmpv6_send+0xe4/0x110 net/ipv6/ip6_icmp.c:43
 ip6_link_failure+0x68/0x590 net/ipv6/route.c:2668
 dst_link_failure include/net/dst.h:426 [inline]
 ip6_tnl_xmit+0x20bf/0x4320 net/ipv6/ip6_tunnel.c:1288
 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1402 [inline]
 ip6_tnl_start_xmit+0x19e7/0x1d50 net/ipv6/ip6_tunnel.c:1451
 __netdev_start_xmit include/linux/netdevice.h:4611 [inline]
 netdev_start_xmit include/linux/netdevice.h:4625 [inline]
 xmit_one net/core/dev.c:3556 [inline]
 dev_hard_start_xmit+0x50e/0xa70 net/core/dev.c:3572
 sch_direct_xmit+0x580/0x1890 net/sched/sch_generic.c:314
 qdisc_restart net/sched/sch_generic.c:377 [inline]
 __qdisc_run+0x155c/0x33a0 net/sched/sch_generic.c:385
 __dev_xmit_skb net/core/dev.c:3795 [inline]
 __dev_queue_xmit+0x1dce/0x3b20 net/core/dev.c:4100
 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4164
 neigh_connected_output+0x662/0x6e0 net/core/neighbour.c:1518
 neigh_output include/net/neighbour.h:509 [inline]
 ip6_finish_output2+0x20fb/0x2620 net/ipv6/ip6_output.c:117
 ip6_fragment+0x24a9/0x3950 net/ipv6/ip6_output.c:861
 __ip6_finish_output+0x73a/0x8e0 net/ipv6/ip6_output.c:141
 ip6_finish_output+0x166/0x410 net/ipv6/ip6_output.c:153
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip6_output+0x60a/0x770 net/ipv6/ip6_output.c:176
 dst_output include/net/dst.h:443 [inline]
 ip6_local_out+0x164/0x1d0 net/ipv6/output_core.c:179
 ip6_send_skb net/ipv6/ip6_output.c:1865 [inline]
 ip6_push_pending_frames+0x213/0x4f0 net/ipv6/ip6_output.c:1885
 rawv6_push_pending_frames net/ipv6/raw.c:613 [inline]
 rawv6_sendmsg+0x4233/0x5c30 net/ipv6/raw.c:956
 inet_sendmsg+0x2d8/0x2e0 net/ipv4/af_inet.c:814
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 __sys_sendto+0xade/0xc90 net/socket.c:1995
 __do_sys_sendto net/socket.c:2007 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:2003
 __ia32_sys_sendto+0x6e/0x90 net/socket.c:2003
 do_syscall_32_irqs_on arch/x86/entry/common.c:430 [inline]
 __do_fast_syscall_32+0x2aa/0x400 arch/x86/entry/common.c:477
 do_fast_syscall_32+0x6b/0xd0 arch/x86/entry/common.c:505
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:554
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf7ff3549
Code: Bad RIP value.
RSP: 002b:00000000f5dee0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000171
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000000
RDX: 000000000000ff77 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000004d97 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127
 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:80
 slab_alloc_node mm/slub.c:2839 [inline]
 slab_alloc mm/slub.c:2848 [inline]
 __kmalloc_track_caller+0x8ce/0xef0 mm/slub.c:4447
 kmemdup+0x95/0x140 mm/util.c:127
 neigh_sysctl_register+0xd2/0xd10 net/core/neighbour.c:3628
 devinet_sysctl_register+0x151/0x3a0 net/ipv4/devinet.c:2609
 inetdev_init+0x580/0xad0 net/ipv4/devinet.c:276
 inetdev_event+0x3dd/0x1e80 net/ipv4/devinet.c:1531
 notifier_call_chain kernel/notifier.c:83 [inline]
 __raw_notifier_call_chain kernel/notifier.c:361 [inline]
 raw_notifier_call_chain+0x130/0x250 kernel/notifier.c:368
 call_netdevice_notifiers_info net/core/dev.c:2027 [inline]
 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
 call_netdevice_notifiers net/core/dev.c:2053 [inline]
 register_netdevice+0x2c5d/0x3290 net/core/dev.c:9545
 br_dev_newlink+0x92/0x2c0 net/bridge/br_netlink.c:1347
 __rtnl_newlink net/core/rtnetlink.c:3339 [inline]
 rtnl_newlink+0x2973/0x3900 net/core/rtnetlink.c:3397
 rtnetlink_rcv_msg+0x1184/0x15c0 net/core/rtnetlink.c:5460
 netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2469
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5478
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x1246/0x14d0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x1370/0x1400 net/socket.c:2352
 ___sys_sendmsg net/socket.c:2406 [inline]
 __sys_sendmsg+0x623/0x750 net/socket.c:2439
 __compat_sys_sendmsg net/compat.c:466 [inline]
 __do_compat_sys_sendmsg net/compat.c:473 [inline]
 __se_compat_sys_sendmsg+0xa7/0xc0 net/compat.c:470
 __ia32_compat_sys_sendmsg+0x4a/0x70 net/compat.c:470
 do_syscall_32_irqs_on arch/x86/entry/common.c:430 [inline]
 __do_fast_syscall_32+0x2aa/0x400 arch/x86/entry/common.c:477
 do_fast_syscall_32+0x6b/0xd0 arch/x86/entry/common.c:505
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:554
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/22 16:09 https://github.com/google/kmsan.git master 93f54a72361a 128cd85f .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.