====================================== | [ 3861.260248][ T71] ================================================================== | [ 3861.260743][ T71] BUG: KASAN: slab-use-after-free in vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan | [ 3861.261264][ T71] Read of size 8 at addr ffff888007a98bd0 by task kworker/u8:1/71 | [ 3861.261652][ T71] [ 3861.262321][ T71] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 3861.263089][ T71] Workqueue: netns cleanup_net [ 3861.263397][ T71] Call Trace: [ 3861.263569][ T71] [ 3861.263719][ T71] dump_stack_lvl (lib/dump_stack.c:107) [ 3861.263992][ T71] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 3861.264326][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 3861.264707][ T71] print_report (mm/kasan/report.c:489) [ 3861.264934][ T71] ? kasan_addr_to_slab (./arch/x86/include/asm/bitops.h:206 ./arch/x86/include/asm/bitops.h:238 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 ./include/linux/page-flags.h:481 mm/kasan/../slab.h:206 mm/kasan/common.c:38) [ 3861.265190][ T71] kasan_report (mm/kasan/report.c:603) [ 3861.265409][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 3861.265734][ T71] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 3861.266047][ T71] ? __pfx_vlan_device_event (net/8021q/vlan.c:362) 8021q [ 3861.266376][ T71] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 3861.266716][ T71] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 3861.267051][ T71] notifier_call_chain (kernel/notifier.c:93) [ 3861.267331][ T71] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 3861.267706][ T71] ? mutex_is_locked (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2569 ./include/linux/atomic/atomic-long.h:38 ./include/linux/atomic/atomic-instrumented.h:3161 kernel/locking/mutex.c:81 kernel/locking/mutex.c:91) [ 3861.268016][ T71] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 3861.268381][ T71] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 3861.268681][ T71] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 3861.269044][ T71] default_device_exit_batch (net/core/dev.c:11629) [ 3861.269393][ T71] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 3861.269704][ T71] ? mutex_is_locked (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2569 ./include/linux/atomic/atomic-long.h:38 ./include/linux/atomic/atomic-instrumented.h:3161 kernel/locking/mutex.c:81 kernel/locking/mutex.c:91) [ 3861.270026][ T71] ? nexthop_net_exit_batch_rtnl (net/ipv4/nexthop.c:569 net/ipv4/nexthop.c:1918 net/ipv4/nexthop.c:2426 net/ipv4/nexthop.c:3754) [ 3861.270325][ T71] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 3861.270580][ T71] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 3861.270864][ T71] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 3861.271159][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 3861.271397][ T71] ? process_one_work (kernel/workqueue.c:2609) [ 3861.271657][ T71] process_one_work (kernel/workqueue.c:2633) [ 3861.271909][ T71] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:228) [ 3861.272141][ T71] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 3861.272415][ T71] ? assign_work (kernel/workqueue.c:1101) [ 3861.272650][ T71] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 3861.272887][ T71] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 3861.273221][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 3861.273479][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 3861.273738][ T71] kthread (kernel/kthread.c:388) [ 3861.273944][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 3861.274178][ T71] ret_from_fork (arch/x86/kernel/process.c:147) [ 3861.274405][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 3861.274639][ T71] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | [ 3861.294721][ T71] ================================================================== | [ 3861.295333][ T71] Disabling lock debugging due to kernel taint | [ 3861.295677][ T71] general protection fault, probably for non-canonical address 0xdffffc002000007d: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 3861.296301][ T71] KASAN: probably user-memory-access in range [0x00000001000003e8-0x00000001000003ef] [ 3861.297253][ T71] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 3861.297861][ T71] Workqueue: netns cleanup_net [ 3861.298106][ T71] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 3861.298483][ T71] Code: 00 00 00 48 b9 00 00 00 00 00 fc ff df 49 89 c0 48 89 44 24 08 49 c1 e8 03 4d 8d 24 08 eb 2c 48 8d 53 30 48 89 d0 48 c1 e8 03 <80> 3c 08 00 0f 85 e0 00 00 00 48 8b 43 30 49 89 dd 48 83 e8 30 49 All code ======== 0: 00 00 add %al,(%rax) 2: 00 48 b9 add %cl,-0x47(%rax) 5: 00 00 add %al,(%rax) 7: 00 00 add %al,(%rax) 9: 00 fc add %bh,%ah b: ff (bad) c: df 49 89 fisttps -0x77(%rcx) f: c0 48 89 44 rorb $0x44,-0x77(%rax) 13: 24 08 and $0x8,%al 15: 49 c1 e8 03 shr $0x3,%r8 19: 4d 8d 24 08 lea (%r8,%rcx,1),%r12 1d: eb 2c jmp 0x4b 1f: 48 8d 53 30 lea 0x30(%rbx),%rdx 23: 48 89 d0 mov %rdx,%rax 26: 48 c1 e8 03 shr $0x3,%rax 2a:* 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction 2e: 0f 85 e0 00 00 00 jne 0x114 34: 48 8b 43 30 mov 0x30(%rbx),%rax 38: 49 89 dd mov %rbx,%r13 3b: 48 83 e8 30 sub $0x30,%rax 3f: 49 rex.WB Code starting with the faulting instruction =========================================== 0: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) 4: 0f 85 e0 00 00 00 jne 0xea a: 48 8b 43 30 mov 0x30(%rbx),%rax e: 49 89 dd mov %rbx,%r13 11: 48 83 e8 30 sub $0x30,%rax 15: 49 rex.WB [ 3861.299603][ T71] RSP: 0018:ffffc9000051f980 EFLAGS: 00010206 [ 3861.299971][ T71] RAX: 000000002000007d RBX: 00000001000003b8 RCX: dffffc0000000000 [ 3861.300417][ T71] RDX: 00000001000003e8 RSI: 0000000000000004 RDI: ffff888007a98c24 [ 3861.300861][ T71] RBP: 1ffff920000a3f33 R08: 1ffff110012a881a R09: ffffc9000051f9b8 [ 3861.301314][ T71] R10: ffffffffbd33ca07 R11: 205d313754202020 R12: ffffed10012a881a [ 3861.301803][ T71] R13: ffff888007a98ba0 R14: ffff88800af39000 R15: ffff888009544000 [ 3861.302231][ T71] FS: 0000000000000000(0000) GS:ffff88802f400000(0000) knlGS:0000000000000000 [ 3861.302728][ T71] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3861.303157][ T71] CR2: 00007f07c51f130d CR3: 000000000862a005 CR4: 0000000000770ef0 [ 3861.303595][ T71] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3861.304032][ T71] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3861.304516][ T71] PKRU: 55555554 [ 3861.304737][ T71] Call Trace: [ 3861.304926][ T71] [ 3861.305110][ T71] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 3861.305324][ T71] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 3861.305725][ T71] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 3861.306086][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 3861.306457][ T71] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 3861.306885][ T71] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 3861.307252][ T71] notifier_call_chain (kernel/notifier.c:93) [ 3861.307604][ T71] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 3861.308019][ T71] ? mutex_is_locked (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2569 ./include/linux/atomic/atomic-long.h:38 ./include/linux/atomic/atomic-instrumented.h:3161 kernel/locking/mutex.c:81 kernel/locking/mutex.c:91) [ 3861.308335][ T71] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 3861.308693][ T71] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 3861.309070][ T71] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 3861.309461][ T71] default_device_exit_batch (net/core/dev.c:11629) [ 3861.309806][ T71] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 3861.310156][ T71] ? mutex_is_locked (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2569 ./include/linux/atomic/atomic-long.h:38 ./include/linux/atomic/atomic-instrumented.h:3161 kernel/locking/mutex.c:81 kernel/locking/mutex.c:91) [ 3861.310444][ T71] ? nexthop_net_exit_batch_rtnl (net/ipv4/nexthop.c:569 net/ipv4/nexthop.c:1918 net/ipv4/nexthop.c:2426 net/ipv4/nexthop.c:3754) [ 3861.310829][ T71] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 3861.311133][ T71] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 3861.311462][ T71] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 3861.311810][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 3861.312077][ T71] ? process_one_work (kernel/workqueue.c:2609) [ 3861.312399][ T71] process_one_work (kernel/workqueue.c:2633) [ 3861.312686][ T71] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:228) [ 3861.312971][ T71] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 3861.313248][ T71] ? assign_work (kernel/workqueue.c:1101) [ 3861.313480][ T71] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 3861.313718][ T71] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 3861.314046][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 3861.314304][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 3861.314560][ T71] kthread (kernel/kthread.c:388) [ 3861.314769][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 3861.314999][ T71] ret_from_fork (arch/x86/kernel/process.c:147) [ 3861.315225][ T71] ? __pfx_kthread (kernel/kthread.c:341) Finger prints: dump_stack_lvl:print_report:kasan_report:vxlan_netdevice_event vxlan_netdevice_event:notifier_call_chain:unregister_netdevice_many_notify:default_device_exit_batch