====================================== | [ 1064.774865][ T71] ================================================================== | [ 1064.775347][ T71] BUG: KASAN: use-after-free in vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan | [ 1064.775788][ T71] Read of size 8 at addr ffff888009a80bf0 by task kworker/u8:1/71 | [ 1064.776191][ T71] [ 1064.776720][ T71] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1064.777344][ T71] Workqueue: netns cleanup_net [ 1064.777600][ T71] Call Trace: [ 1064.777772][ T71] [ 1064.777925][ T71] dump_stack_lvl (lib/dump_stack.c:107) [ 1064.778157][ T71] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 1064.778504][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1064.778837][ T71] print_report (mm/kasan/report.c:489) [ 1064.779059][ 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) [ 1064.779312][ T71] kasan_report (mm/kasan/report.c:603) [ 1064.779548][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1064.779870][ T71] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1064.780182][ T71] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 1064.780530][ T71] ? nft_offload_netdev_event (net/netfilter/nf_tables_offload.c:677) nf_tables [ 1064.780937][ T71] ? mirred_device_event (./include/linux/spinlock.h:392 net/sched/act_mirred.c:543) act_mirred [ 1064.781270][ T71] notifier_call_chain (kernel/notifier.c:93) [ 1064.781534][ T71] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 1064.781854][ 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) [ 1064.782095][ T71] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 1064.782431][ T71] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 1064.782745][ T71] default_device_exit_batch (net/core/dev.c:11629) [ 1064.783040][ T71] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 1064.783360][ 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) [ 1064.783600][ 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) [ 1064.783899][ T71] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 1064.784125][ T71] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1064.784411][ T71] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 1064.784666][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 1064.784904][ T71] ? process_one_work (kernel/workqueue.c:2609) [ 1064.785177][ T71] process_one_work (kernel/workqueue.c:2633) [ 1064.785442][ 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) [ 1064.785669][ T71] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 1064.785944][ T71] ? assign_work (kernel/workqueue.c:1101) [ 1064.786182][ T71] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 1064.786426][ T71] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 1064.786753][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1064.787009][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1064.787264][ T71] kthread (kernel/kthread.c:388) [ 1064.787472][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 1064.787704][ T71] ret_from_fork (arch/x86/kernel/process.c:147) [ 1064.787930][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 1064.788173][ T71] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | # │ vxlan │ 4 │ 4 │ fixed 0x80 │ fixed 7 │ false │ OK │ | # │ vxlan │ 4 │ 4 │ fixed 0xa4 │ fixed 49 │ true │ OK │ | [ 1077.911374][ T71] general protection fault, probably for non-canonical address 0xf999959999999999: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 1077.912019][ T71] KASAN: maybe wild-memory-access in range [0xccccccccccccccc8-0xcccccccccccccccf] [ 1077.912953][ T71] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1077.913599][ T71] Workqueue: netns cleanup_net [ 1077.913875][ T71] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1077.914249][ 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 [ 1077.915280][ T71] RSP: 0018:ffffc9000051f980 EFLAGS: 00010a07 [ 1077.915584][ T71] RAX: 1999999999999999 RBX: cccccccccccccc9c RCX: dffffc0000000000 [ 1077.916016][ T71] RDX: cccccccccccccccc RSI: 0000000000000004 RDI: ffff888009800c44 [ 1077.916411][ T71] RBP: 1ffff920000a3f33 R08: 1ffff11000a7c21a R09: ffffc9000051f9b8 [ 1077.916806][ T71] R10: ffffffffbb950f57 R11: ffff8880053e1000 R12: ffffed1000a7c21a [ 1077.917201][ T71] R13: ffff888009800bc0 R14: ffff8880077a4000 R15: ffff8880053e1000 [ 1077.917598][ T71] FS: 0000000000000000(0000) GS:ffff88802e800000(0000) knlGS:0000000000000000 [ 1077.918057][ T71] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1077.918400][ T71] CR2: 00007fe0dd5f80e0 CR3: 0000000033534001 CR4: 0000000000770ef0 [ 1077.918800][ T71] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1077.919194][ T71] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1077.919596][ T71] PKRU: 55555554 [ 1077.919775][ T71] Call Trace: [ 1077.919952][ T71] [ 1077.920104][ T71] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 1077.920317][ T71] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 1077.920616][ T71] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 1077.920925][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 1077.921274][ T71] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 1077.921636][ T71] ? nft_offload_netdev_event (net/netfilter/nf_tables_offload.c:677) nf_tables [ 1077.922049][ T71] ? mirred_device_event (./include/linux/spinlock.h:392 net/sched/act_mirred.c:543) act_mirred [ 1077.922397][ T71] notifier_call_chain (kernel/notifier.c:93) [ 1077.922681][ T71] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 1077.923037][ 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) [ 1077.923299][ T71] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 1077.923649][ T71] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 1077.924001][ T71] ? __wake_up (kernel/sched/wait.c:110 kernel/sched/wait.c:127) [ 1077.924267][ T71] default_device_exit_batch (net/core/dev.c:11629) [ 1077.924571][ T71] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 1077.924894][ 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) [ 1077.925160][ 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) [ 1077.925485][ T71] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 1077.925738][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 1077.925987][ T71] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 1077.926278][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 1077.926539][ T71] ? process_one_work (kernel/workqueue.c:2609) [ 1077.926829][ T71] process_one_work (kernel/workqueue.c:2633) [ 1077.927087][ 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) [ 1077.927343][ T71] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 1077.927641][ T71] ? assign_work (kernel/workqueue.c:1101) [ 1077.927917][ T71] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 1077.928165][ T71] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 1077.928537][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1077.928826][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 1077.929106][ T71] kthread (kernel/kthread.c:388) [ 1077.929322][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 1077.929576][ T71] ret_from_fork (arch/x86/kernel/process.c:147) [ 1077.929824][ 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