====================================== | [ 1151.118310][ T69] ================================================================== | [ 1151.118820][ T69] 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 | [ 1151.119287][ T69] Read of size 8 at addr ffff888009418bd0 by task kworker/u8:1/69 | [ 1151.119729][ T69] [ 1151.120253][ T69] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1151.120900][ T69] Workqueue: netns cleanup_net [ 1151.121243][ T69] Call Trace: [ 1151.121439][ T69] [ 1151.121653][ T69] dump_stack_lvl (lib/dump_stack.c:107) [ 1151.121889][ T69] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 1151.122230][ T69] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1151.122618][ T69] print_report (mm/kasan/report.c:489) [ 1151.122870][ T69] ? 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) [ 1151.123123][ T69] kasan_report (mm/kasan/report.c:603) [ 1151.123383][ T69] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1151.123823][ T69] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1151.124194][ T69] ? __pfx_vlan_device_event (net/8021q/vlan.c:362) 8021q [ 1151.124523][ T69] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 1151.124973][ T69] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 1151.125289][ T69] notifier_call_chain (kernel/notifier.c:93) [ 1151.125677][ T69] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 1151.126077][ T69] ? 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) [ 1151.126338][ T69] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 1151.126754][ T69] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 1151.127086][ T69] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 1151.127447][ T69] default_device_exit_batch (net/core/dev.c:11629) [ 1151.127868][ T69] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 1151.128212][ T69] ? 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) [ 1151.128528][ T69] ? 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) [ 1151.128897][ T69] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 1151.129184][ T69] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1151.129503][ T69] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 1151.129790][ T69] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 1151.130129][ T69] ? process_one_work (kernel/workqueue.c:2609) [ 1151.130457][ T69] process_one_work (kernel/workqueue.c:2633) [ 1151.130709][ T69] ? 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) [ 1151.131005][ T69] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 1151.131340][ T69] ? assign_work (kernel/workqueue.c:1101) [ 1151.131624][ T69] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 1151.131858][ T69] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 1151.132240][ T69] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1151.132561][ T69] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1151.132823][ T69] kthread (kernel/kthread.c:388) [ 1151.133109][ T69] ? __pfx_kthread (kernel/kthread.c:341) [ 1151.133341][ T69] ret_from_fork (arch/x86/kernel/process.c:147) [ 1151.133603][ T69] ? __pfx_kthread (kernel/kthread.c:341) [ 1151.133853][ T69] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | [ 1151.154427][ T69] ================================================================== | [ 1151.155689][ T69] Disabling lock debugging due to kernel taint | [ 1151.156061][ T69] general protection fault, probably for non-canonical address 0xdffffc002000007d: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 1151.156734][ T69] KASAN: probably user-memory-access in range [0x00000001000003e8-0x00000001000003ef] [ 1151.157774][ T69] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1151.158451][ T69] Workqueue: netns cleanup_net [ 1151.158759][ T69] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1151.159153][ T69] 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 [ 1151.160216][ T69] RSP: 0018:ffffc900004ef980 EFLAGS: 00010206 [ 1151.160564][ T69] RAX: 000000002000007d RBX: 00000001000003b8 RCX: dffffc0000000000 [ 1151.160989][ T69] RDX: 00000001000003e8 RSI: 0000000000000004 RDI: ffff888009418c24 [ 1151.161414][ T69] RBP: 1ffff9200009df33 R08: 1ffff11000c8b21a R09: ffffc900004ef9b8 [ 1151.161865][ T69] R10: ffffffff8973ca07 R11: 205d393654202020 R12: ffffed1000c8b21a [ 1151.162267][ T69] R13: ffff888009418ba0 R14: ffff888003864000 R15: ffff888006459000 [ 1151.162655][ T69] FS: 0000000000000000(0000) GS:ffff888035a00000(0000) knlGS:0000000000000000 [ 1151.163112][ T69] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1151.163455][ T69] CR2: 00007fa6f6e7e008 CR3: 000000000adba004 CR4: 0000000000770ef0 [ 1151.163848][ T69] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1151.164240][ T69] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1151.164630][ T69] PKRU: 55555554 [ 1151.164809][ T69] Call Trace: [ 1151.164990][ T69] [ 1151.165138][ T69] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 1151.165356][ T69] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 1151.165648][ T69] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 1151.165951][ T69] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1151.166308][ T69] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 1151.166643][ T69] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 1151.166929][ T69] notifier_call_chain (kernel/notifier.c:93) [ 1151.167185][ T69] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 1151.167538][ T69] ? 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) [ 1151.167792][ T69] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 1151.168210][ T69] ? vrf_dellink (drivers/net/vrf.c:1708) vrf [ 1151.168494][ T69] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 1151.168805][ T69] default_device_exit_batch (net/core/dev.c:11629) [ 1151.169112][ T69] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 1151.169501][ T69] ? 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) [ 1151.169740][ T69] ? 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) [ 1151.170035][ T69] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 1151.170257][ T69] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1151.170545][ T69] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 1151.170794][ T69] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 1151.171033][ T69] ? process_one_work (kernel/workqueue.c:2609) [ 1151.171302][ T69] process_one_work (kernel/workqueue.c:2633) [ 1151.171551][ T69] ? 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) [ 1151.171779][ T69] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 1151.172054][ T69] ? assign_work (kernel/workqueue.c:1101) [ 1151.172288][ T69] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 1151.172529][ T69] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 1151.172868][ T69] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1151.173135][ T69] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1151.173401][ T69] kthread (kernel/kthread.c:388) [ 1151.173628][ T69] ? __pfx_kthread (kernel/kthread.c:341) [ 1151.173866][ T69] ret_from_fork (arch/x86/kernel/process.c:147) [ 1151.174089][ T69] ? __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