====================================== | [ 1158.817845][ T70] ================================================================== | [ 1158.818486][ T70] 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 | [ 1158.819178][ T70] Read of size 8 at addr ffff888002030bd0 by task kworker/u8:1/70 | [ 1158.819749][ T70] [ 1158.820598][ T70] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1158.821588][ T70] Workqueue: netns cleanup_net [ 1158.822011][ T70] Call Trace: [ 1158.822494][ T70] [ 1158.822714][ T70] dump_stack_lvl (lib/dump_stack.c:107) [ 1158.823117][ T70] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 1158.823650][ T70] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1158.824177][ T70] print_report (mm/kasan/report.c:489) [ 1158.824585][ T70] ? 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) [ 1158.825002][ T70] kasan_report (mm/kasan/report.c:603) [ 1158.825372][ T70] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1158.825911][ T70] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1158.826443][ T70] ? __pfx_vlan_device_event (net/8021q/vlan.c:362) 8021q [ 1158.826911][ T70] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 1158.827375][ T70] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 1158.827816][ T70] notifier_call_chain (kernel/notifier.c:93) [ 1158.828235][ T70] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 1158.828588][ T70] ? 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) [ 1158.828840][ T70] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 1158.829187][ T70] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 1158.829488][ T70] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 1158.829853][ T70] default_device_exit_batch (net/core/dev.c:11629) [ 1158.830202][ T70] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 1158.830540][ T70] ? 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) [ 1158.830817][ T70] ? 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) [ 1158.831154][ T70] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 1158.831382][ T70] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1158.831674][ T70] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 1158.831931][ T70] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 1158.832189][ T70] ? process_one_work (kernel/workqueue.c:2609) [ 1158.832450][ T70] process_one_work (kernel/workqueue.c:2633) [ 1158.832700][ T70] ? 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) [ 1158.832955][ T70] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 1158.833226][ T70] ? assign_work (kernel/workqueue.c:1101) [ 1158.833471][ T70] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 1158.833715][ T70] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 1158.834058][ T70] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1158.834315][ T70] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1158.834571][ T70] kthread (kernel/kthread.c:388) [ 1158.834788][ T70] ? __pfx_kthread (kernel/kthread.c:341) [ 1158.835025][ T70] ret_from_fork (arch/x86/kernel/process.c:147) [ 1158.835249][ T70] ? __pfx_kthread (kernel/kthread.c:341) [ 1158.835481][ T70] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | [ 1158.855013][ T70] ================================================================== | [ 1158.855446][ T70] Disabling lock debugging due to kernel taint | [ 1158.855969][ T70] general protection fault, probably for non-canonical address 0xdffffc002000007d: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 1158.856584][ T70] KASAN: probably user-memory-access in range [0x00000001000003e8-0x00000001000003ef] [ 1158.857825][ T70] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1158.858506][ T70] Workqueue: netns cleanup_net [ 1158.858798][ T70] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1158.859242][ T70] 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 [ 1158.860367][ T70] RSP: 0018:ffffc9000050f980 EFLAGS: 00010206 [ 1158.860749][ T70] RAX: 000000002000007d RBX: 00000001000003b8 RCX: dffffc0000000000 [ 1158.861187][ T70] RDX: 00000001000003e8 RSI: 0000000000000004 RDI: ffff888002030c24 [ 1158.861618][ T70] RBP: 1ffff920000a1f33 R08: 1ffff1100147481a R09: ffffc9000050f9b8 [ 1158.862011][ T70] R10: ffffffff9a73ca07 R11: 205d303754202020 R12: ffffed100147481a [ 1158.862449][ T70] R13: ffff888002030ba0 R14: ffff88800932c000 R15: ffff88800a3a4000 [ 1158.862903][ T70] FS: 0000000000000000(0000) GS:ffff888035600000(0000) knlGS:0000000000000000 [ 1158.863344][ T70] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1158.863672][ T70] CR2: 00007f09d8a79008 CR3: 000000000b566006 CR4: 0000000000770ef0 [ 1158.864067][ T70] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1158.864461][ T70] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1158.864853][ T70] PKRU: 55555554 [ 1158.865054][ T70] Call Trace: [ 1158.865234][ T70] [ 1158.865410][ T70] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 1158.865684][ T70] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 1158.865966][ T70] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 1158.866280][ T70] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1158.866638][ T70] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 1158.866996][ T70] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 1158.867298][ T70] notifier_call_chain (kernel/notifier.c:93) [ 1158.867581][ T70] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 1158.867927][ T70] ? 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) [ 1158.868179][ T70] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 1158.868562][ T70] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 1158.868882][ T70] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 1158.869264][ T70] default_device_exit_batch (net/core/dev.c:11629) [ 1158.869609][ T70] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 1158.869993][ T70] ? 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) [ 1158.870288][ T70] ? 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) [ 1158.870633][ T70] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 1158.870885][ T70] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1158.871238][ T70] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 1158.871489][ T70] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 1158.871778][ T70] ? process_one_work (kernel/workqueue.c:2609) [ 1158.872085][ T70] process_one_work (kernel/workqueue.c:2633) [ 1158.872352][ T70] ? 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) [ 1158.872625][ T70] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 1158.872942][ T70] ? assign_work (kernel/workqueue.c:1101) [ 1158.873244][ T70] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 1158.873481][ T70] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 1158.873892][ T70] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1158.874170][ T70] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1158.874459][ T70] kthread (kernel/kthread.c:388) [ 1158.874666][ T70] ? __pfx_kthread (kernel/kthread.c:341) [ 1158.874947][ T70] ret_from_fork (arch/x86/kernel/process.c:147) [ 1158.875205][ T70] ? __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