====================================== | [ 217.084477][ T11] ================================================================== | [ 217.084964][ T11] 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 | [ 217.085462][ T11] Read of size 8 at addr ffff888007578bf0 by task kworker/u8:0/11 | [ 217.085861][ T11] [ 217.086417][ T11] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 217.087072][ T11] Workqueue: netns cleanup_net [ 217.087337][ T11] Call Trace: [ 217.087517][ T11] [ 217.087730][ T11] dump_stack_lvl (lib/dump_stack.c:107) [ 217.087976][ T11] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 217.088436][ T11] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 217.088835][ T11] print_report (mm/kasan/report.c:489) [ 217.089080][ T11] ? 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) [ 217.089369][ T11] kasan_report (mm/kasan/report.c:603) [ 217.089601][ T11] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 217.090007][ T11] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 217.090336][ T11] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 217.090698][ T11] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 217.091002][ T11] notifier_call_chain (kernel/notifier.c:93) [ 217.091272][ T11] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 217.091659][ T11] ? 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) [ 217.091914][ T11] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 217.092337][ T11] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 217.092678][ T11] default_device_exit_batch (net/core/dev.c:11629) [ 217.092991][ T11] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 217.093321][ T11] ? 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) [ 217.093567][ T11] ? 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) [ 217.093938][ T11] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 217.094167][ T11] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 217.094513][ T11] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 217.094774][ T11] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 217.095061][ T11] ? process_one_work (kernel/workqueue.c:2609) [ 217.095332][ T11] process_one_work (kernel/workqueue.c:2633) [ 217.095607][ T11] ? 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) [ 217.095841][ T11] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 217.096190][ T11] ? assign_work (kernel/workqueue.c:1101) [ 217.096430][ T11] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 217.096738][ T11] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 217.097000][ T11] kthread (kernel/kthread.c:388) [ 217.097211][ T11] ? __pfx_kthread (kernel/kthread.c:341) [ 217.097474][ T11] ret_from_fork (arch/x86/kernel/process.c:147) [ 217.097719][ T11] ? __pfx_kthread (kernel/kthread.c:341) [ 217.097971][ T11] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | [ 217.117235][ T11] ================================================================== | [ 217.118954][ T11] Disabling lock debugging due to kernel taint | [ 217.119421][ T11] general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 217.120094][ T11] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 217.121084][ T11] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 217.121768][ T11] Workqueue: netns cleanup_net [ 217.122044][ T11] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 217.122454][ T11] 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 [ 217.123522][ T11] RSP: 0018:ffffc900000bf980 EFLAGS: 00010246 [ 217.123862][ T11] RAX: 0000000000000000 RBX: ffffffffffffffd1 RCX: dffffc0000000000 [ 217.124295][ T11] RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffff888007578c44 [ 217.124762][ T11] RBP: 1ffff92000017f33 R08: 1ffff1100069581a R09: ffffc900000bf9b8 [ 217.125203][ T11] R10: ffffffff9e034a07 R11: 205d313154202020 R12: ffffed100069581a [ 217.125629][ T11] R13: ffff888007578bc0 R14: ffff8880104a1000 R15: ffff8880034ac000 [ 217.126038][ T11] FS: 0000000000000000(0000) GS:ffff888035e00000(0000) knlGS:0000000000000000 [ 217.126506][ T11] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 217.126838][ T11] CR2: 00007ffeece85678 CR3: 000000000df3c003 CR4: 0000000000770ef0 [ 217.127242][ T11] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 217.127640][ T11] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 217.128042][ T11] PKRU: 55555554 [ 217.128224][ T11] Call Trace: [ 217.128396][ T11] [ 217.128547][ T11] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 217.128790][ T11] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 217.129092][ T11] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 217.129384][ T11] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 217.129713][ T11] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 217.130075][ T11] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 217.130400][ T11] notifier_call_chain (kernel/notifier.c:93) [ 217.130694][ T11] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 217.131058][ T11] ? 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) [ 217.131317][ T11] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 217.131702][ T11] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 217.132071][ T11] default_device_exit_batch (net/core/dev.c:11629) [ 217.132375][ T11] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 217.132740][ T11] ? 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) [ 217.133021][ T11] ? 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) [ 217.133360][ T11] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 217.133617][ T11] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 217.133916][ T11] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 217.134210][ T11] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 217.134506][ T11] ? process_one_work (kernel/workqueue.c:2609) [ 217.134774][ T11] process_one_work (kernel/workqueue.c:2633) [ 217.135053][ T11] ? 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) [ 217.135309][ T11] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 217.135620][ T11] ? assign_work (kernel/workqueue.c:1101) [ 217.135897][ T11] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 217.136169][ T11] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 217.136435][ T11] kthread (kernel/kthread.c:388) [ 217.136685][ T11] ? __pfx_kthread (kernel/kthread.c:341) [ 217.136963][ T11] ret_from_fork (arch/x86/kernel/process.c:147) [ 217.137249][ T11] ? __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