syzbot


KMSAN: uninit-value in __xfrm_decode_session

Status: closed as invalid on 2019/10/08 12:18
Subsystems: net
[Documentation on labels]
First crash: 1664d, last: 1664d
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 1546d 1620d 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 865d 1102d 0/26 auto-closed as invalid on 2022/04/04 17:22
upstream KMSAN: kernel-infoleak in copyout (2) net C 6723 316d 1484d 22/26 fixed on 2023/06/08 14:41
upstream KMSAN: kernel-infoleak in _copy_to_iter (7) net C 138977 420d 772d 22/26 fixed on 2023/02/24 13:50
upstream KMSAN: uninit-value in __xfrm_decode_session (4) net C 8 180d 227d 0/26 closed as invalid on 2023/12/14 11:46
upstream KMSAN: uninit-value in __xfrm_decode_session (3) net 1 1367d 1367d 0/26 auto-closed as invalid on 2020/10/20 16:12

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in vti6_tnl_xmit+0x85a/0x27a0 net/ipv6/ip6_vti.c:531
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.0-rc7+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x13a/0x2b0 mm/kmsan/kmsan_report.c:108
 __msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:250
 decode_session6 net/xfrm/xfrm_policy.c:3405 [inline]
 __xfrm_decode_session+0x18ec/0x33e0 net/xfrm/xfrm_policy.c:3480
 vti6_tnl_xmit+0x85a/0x27a0 net/ipv6/ip6_vti.c:531
 __netdev_start_xmit include/linux/netdevice.h:4406 [inline]
 netdev_start_xmit include/linux/netdevice.h:4420 [inline]
 xmit_one net/core/dev.c:3280 [inline]
 dev_hard_start_xmit+0x51a/0xab0 net/core/dev.c:3296
 sch_direct_xmit+0x56c/0x18c0 net/sched/sch_generic.c:309
 qdisc_restart net/sched/sch_generic.c:372 [inline]
 __qdisc_run+0x1575/0x33b0 net/sched/sch_generic.c:380
 __dev_xmit_skb net/core/dev.c:3533 [inline]
 __dev_queue_xmit+0x2377/0x4270 net/core/dev.c:3838
 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3902
 neigh_direct_output+0x42/0x50 net/core/neighbour.c:1530
 neigh_output include/net/neighbour.h:511 [inline]
 ip6_finish_output2+0x2129/0x2670 net/ipv6/ip6_output.c:116
 __ip6_finish_output+0x83d/0x8f0 net/ipv6/ip6_output.c:142
 ip6_finish_output+0x2db/0x420 net/ipv6/ip6_output.c:152
 NF_HOOK_COND include/linux/netfilter.h:294 [inline]
 ip6_output+0x5d3/0x720 net/ipv6/ip6_output.c:175
 dst_output include/net/dst.h:436 [inline]
 NF_HOOK include/linux/netfilter.h:305 [inline]
 ndisc_send_skb+0x1083/0x15e0 net/ipv6/ndisc.c:504
 ndisc_send_rs+0xb5d/0xb90 net/ipv6/ndisc.c:698
 addrconf_rs_timer+0x847/0xc20 net/ipv6/addrconf.c:3879
 call_timer_fn+0x232/0x530 kernel/time/timer.c:1322
 expire_timers kernel/time/timer.c:1366 [inline]
 __run_timers+0xcdc/0x11a0 kernel/time/timer.c:1685
 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1698
 __do_softirq+0x4a1/0x83a kernel/softirq.c:293
 invoke_softirq kernel/softirq.c:375 [inline]
 irq_exit+0x230/0x280 kernel/softirq.c:416
 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:537
 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1135
 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:837
 </IRQ>
RIP: 0010:default_idle+0x53/0x90 arch/x86/kernel/process.c:581
Code: 13 ee eb f2 44 8b 35 94 79 d2 01 48 c7 c7 78 d5 25 90 e8 d0 9b b1 f3 83 38 00 75 31 45 85 f6 7e 07 0f 00 2d 8f f3 4d 00 fb f4 <65> 8b 35 2e 57 af 71 c7 03 00 00 00 00 c7 43 08 00 00 00 00 bf ff
RSP: 0018:ffffffff8f60fda0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: ffff888217c47578 RBX: ffffffff8f638b60 RCX: ccccccccccccd000
RDX: ffff888207e40578 RSI: ffffea000a76d630 RDI: 000000001025d578
RBP: ffffffff8f60fdb0 R08: 0000000000000000 R09: ffff88821f4a91c2
R10: 0000000000000004 R11: ffffffff8e535bb0 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: ffffffff8f638b60
 arch_cpu_idle+0x25/0x30 arch/x86/kernel/process.c:571
 default_idle_call kernel/sched/idle.c:94 [inline]
 cpuidle_idle_call kernel/sched/idle.c:154 [inline]
 do_idle+0x1d7/0x790 kernel/sched/idle.c:263
 cpu_startup_entry+0x45/0x50 kernel/sched/idle.c:354
 rest_init+0x1be/0x1f0 init/main.c:452
 arch_call_rest_init+0x13/0x15
 start_kernel+0x991/0xb61 init/main.c:788
 x86_64_start_reservations+0x18/0x2e arch/x86/kernel/head64.c:472
 x86_64_start_kernel+0x81/0x84 arch/x86/kernel/head64.c:453
 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:150 [inline]
 kmsan_internal_poison_shadow+0x53/0x100 mm/kmsan/kmsan.c:134
 kmsan_slab_free+0x8d/0x100 mm/kmsan/kmsan_hooks.c:123
 slab_free_freelist_hook mm/slub.c:1472 [inline]
 slab_free mm/slub.c:3038 [inline]
 kfree+0x4c1/0x2db0 mm/slub.c:3980
 skb_free_head net/core/skbuff.c:591 [inline]
 skb_release_data+0x7de/0x9d0 net/core/skbuff.c:611
 skb_release_all net/core/skbuff.c:665 [inline]
 __kfree_skb net/core/skbuff.c:679 [inline]
 kfree_skb+0x322/0x4c0 net/core/skbuff.c:697
 netlink_sock_destruct+0x15b/0x460 net/netlink/af_netlink.c:391
 __sk_destruct+0x8c/0x890 net/core/sock.c:1695
 sk_destruct net/core/sock.c:1734 [inline]
 __sk_free+0x5af/0x640 net/core/sock.c:1745
 sk_free+0x6c/0x90 net/core/sock.c:1756
 deferred_put_nlk_sk+0x2bb/0x340 net/netlink/af_netlink.c:729
 __rcu_reclaim kernel/rcu/rcu.h:222 [inline]
 rcu_do_batch kernel/rcu/tree.c:2114 [inline]
 rcu_core+0xb6f/0x1850 kernel/rcu/tree.c:2314
 rcu_core_si+0xe/0x10 kernel/rcu/tree.c:2323
 __do_softirq+0x4a1/0x83a kernel/softirq.c:293
 invoke_softirq kernel/softirq.c:375 [inline]
 irq_exit+0x230/0x280 kernel/softirq.c:416
 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:537
 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1135
 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:837
 __nr_to_section include/linux/mmzone.h:1234 [inline]
 pfn_valid include/linux/mmzone.h:1344 [inline]
 my_virt_addr_valid mm/kmsan/kmsan_shadow.c:97 [inline]
 kmsan_get_shadow_origin_ptr+0x17b/0x4c0 mm/kmsan/kmsan_shadow.c:179
 __msan_metadata_ptr_for_load_8+0x10/0x20 mm/kmsan/kmsan_instr.c:55
 vm_normal_page mm/memory.c:617 [inline]
 zap_pte_range mm/memory.c:1033 [inline]
 zap_pmd_range mm/memory.c:1162 [inline]
 zap_pud_range mm/memory.c:1191 [inline]
 zap_p4d_range mm/memory.c:1212 [inline]
 unmap_page_range+0xf54/0x3f60 mm/memory.c:1233
 unmap_single_vma+0x43f/0x5e0 mm/memory.c:1278
 unmap_vmas+0x391/0x4b0 mm/memory.c:1310
 exit_mmap+0x50e/0xa00 mm/mmap.c:3145
 __mmput+0x148/0x590 kernel/fork.c:1066
 mmput+0x83/0x90 kernel/fork.c:1087
 exit_mm+0x6b7/0x770 kernel/exit.c:548
 do_exit+0xb12/0x3aa0 kernel/exit.c:868
 do_group_exit+0x18a/0x320 kernel/exit.c:985
 get_signal+0xbf6/0x32f0 kernel/signal.c:2734
 do_signal+0x6f/0xe10 arch/x86/kernel/signal.c:815
 exit_to_usermode_loop arch/x86/entry/common.c:159 [inline]
 prepare_exit_to_usermode+0x2c5/0x4d0 arch/x86/entry/common.c:194
 syscall_return_slowpath+0x90/0x610 arch/x86/entry/common.c:274
 do_syscall_64+0xe2/0xf0 arch/x86/entry/common.c:300
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/29 11:55 https://github.com/google/kmsan.git master 124037e07586 c1ad5441 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.