====================================== | [ 425.082757][ T72] ================================================================== | [ 425.083227][ T72] 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 | [ 425.083742][ T72] Read of size 8 at addr ffff888005bd0bd0 by task kworker/u8:1/72 | [ 425.084149][ T72] [ 425.084697][ T72] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 425.085318][ T72] Workqueue: netns cleanup_net [ 425.085572][ T72] Call Trace: [ 425.085752][ T72] [ 425.085916][ T72] dump_stack_lvl (lib/dump_stack.c:107) [ 425.086164][ T72] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 425.086546][ T72] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 425.086883][ T72] print_report (mm/kasan/report.c:489) [ 425.087108][ T72] ? 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) [ 425.087393][ T72] kasan_report (mm/kasan/report.c:603) [ 425.087645][ T72] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 425.087973][ T72] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 425.088288][ T72] ? __pfx_vlan_device_event (net/8021q/vlan.c:362) 8021q [ 425.088628][ T72] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 425.088994][ T72] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:94 ./include/linux/spinlock_api_smp.h:143 kernel/locking/spinlock.c:186) [ 425.089262][ T72] ? mirred_device_event (./include/linux/spinlock.h:392 net/sched/act_mirred.c:543) act_mirred [ 425.089589][ T72] notifier_call_chain (kernel/notifier.c:93) [ 425.089850][ T72] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 425.090174][ T72] ? 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) [ 425.090419][ T72] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 425.090760][ T72] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 425.091030][ T72] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 425.091349][ T72] default_device_exit_batch (net/core/dev.c:11629) [ 425.091634][ T72] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 425.091960][ T72] ? 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) [ 425.092204][ T72] ? 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) [ 425.092504][ T72] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 425.092731][ T72] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 425.093017][ T72] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 425.093269][ T72] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 425.093508][ T72] ? process_one_work (kernel/workqueue.c:2609) [ 425.093771][ T72] process_one_work (kernel/workqueue.c:2633) [ 425.094069][ T72] ? 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) [ 425.094300][ T72] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 425.094581][ T72] ? assign_work (kernel/workqueue.c:1101) [ 425.094846][ T72] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 425.095108][ T72] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 425.095483][ T72] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 425.095761][ T72] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 425.096033][ T72] kthread (kernel/kthread.c:388) [ 425.096269][ T72] ? __pfx_kthread (kernel/kthread.c:341) [ 425.096506][ T72] ret_from_fork (arch/x86/kernel/process.c:147) [ 425.096731][ T72] ? __pfx_kthread (kernel/kthread.c:341) [ 425.096966][ T72] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | [ 425.115535][ T72] ================================================================== | [ 425.116486][ T72] Disabling lock debugging due to kernel taint | [ 425.116841][ T72] general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 425.117545][ T72] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 425.118512][ T72] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 425.119168][ T72] Workqueue: netns cleanup_net [ 425.119435][ T72] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 425.119827][ T72] 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 [ 425.120893][ T72] RSP: 0018:ffffc9000052f980 EFLAGS: 00010246 [ 425.121198][ T72] RAX: 0000000000000000 RBX: ffffffffffffffd0 RCX: dffffc0000000000 [ 425.121595][ T72] RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff888005bd0c24 [ 425.121997][ T72] RBP: 1ffff920000a5f33 R08: 1ffff11000ca021a R09: ffffc9000052f9b8 [ 425.122392][ T72] R10: ffffffff8a73ca07 R11: 205d323754202020 R12: ffffed1000ca021a [ 425.122786][ T72] R13: ffff888005bd0ba0 R14: ffff88800944c000 R15: ffff888006501000 [ 425.123183][ T72] FS: 0000000000000000(0000) GS:ffff88802ea00000(0000) knlGS:0000000000000000 [ 425.123661][ T72] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 425.124025][ T72] CR2: 00007f1e0e0a8270 CR3: 0000000007d5e006 CR4: 0000000000770ef0 [ 425.124443][ T72] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 425.124853][ T72] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 425.125262][ T72] PKRU: 55555554 [ 425.125454][ T72] Call Trace: [ 425.125636][ T72] [ 425.125799][ T72] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 425.126027][ T72] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 425.126324][ T72] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 425.126627][ T72] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 425.126955][ T72] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 425.127349][ T72] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:94 ./include/linux/spinlock_api_smp.h:143 kernel/locking/spinlock.c:186) [ 425.127611][ T72] ? mirred_device_event (./include/linux/spinlock.h:392 net/sched/act_mirred.c:543) act_mirred [ 425.127961][ T72] notifier_call_chain (kernel/notifier.c:93) [ 425.128219][ T72] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 425.128558][ T72] ? 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) [ 425.128825][ T72] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 425.129185][ T72] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 425.129458][ T72] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 425.129795][ T72] default_device_exit_batch (net/core/dev.c:11629) [ 425.130112][ T72] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 425.130454][ T72] ? 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) [ 425.130723][ T72] ? 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) [ 425.131050][ T72] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 425.131292][ T72] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 425.131583][ T72] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 425.131885][ T72] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 425.132153][ T72] ? process_one_work (kernel/workqueue.c:2609) [ 425.132457][ T72] process_one_work (kernel/workqueue.c:2633) [ 425.132759][ T72] ? 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) [ 425.133015][ T72] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 425.133312][ T72] ? assign_work (kernel/workqueue.c:1101) [ 425.133558][ T72] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 425.133812][ T72] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 425.134172][ T72] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 425.134448][ T72] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 425.134743][ T72] kthread (kernel/kthread.c:388) [ 425.134973][ T72] ? __pfx_kthread (kernel/kthread.c:341) [ 425.135208][ T72] ret_from_fork (arch/x86/kernel/process.c:147) [ 425.135460][ T72] ? __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