====================================== | [ 222.836065][ T11] ================================================================== | [ 222.836553][ T11] BUG: KASAN: use-after-free in vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan | [ 222.837028][ T11] Read of size 8 at addr ffff88800a818bf0 by task kworker/u8:0/11 | [ 222.837458][ T11] [ 222.838021][ T11] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 222.838691][ T11] Workqueue: netns cleanup_net [ 222.838978][ T11] Call Trace: [ 222.839165][ T11] [ 222.839319][ T11] dump_stack_lvl (lib/dump_stack.c:107) [ 222.839585][ T11] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 222.839957][ T11] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 222.840305][ T11] print_report (mm/kasan/report.c:489) [ 222.840547][ 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) [ 222.840830][ T11] kasan_report (mm/kasan/report.c:603) [ 222.841084][ T11] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 222.841417][ T11] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 222.841740][ T11] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 222.842088][ T11] ? nft_offload_netdev_event (net/netfilter/nf_tables_offload.c:677) nf_tables [ 222.842512][ T11] notifier_call_chain (kernel/notifier.c:93) [ 222.842777][ T11] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 222.843104][ 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) [ 222.843353][ T11] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 222.843699][ T11] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 222.844022][ T11] default_device_exit_batch (net/core/dev.c:11629) [ 222.844311][ T11] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 222.844626][ 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) [ 222.844874][ 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) [ 222.845181][ T11] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 222.845410][ T11] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 222.845704][ T11] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 222.845962][ T11] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 222.846204][ T11] ? process_one_work (kernel/workqueue.c:2609) [ 222.846472][ T11] process_one_work (kernel/workqueue.c:2633) [ 222.846730][ 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) [ 222.846965][ T11] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 222.847253][ T11] ? assign_work (kernel/workqueue.c:1101) [ 222.847497][ T11] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 222.847765][ T11] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 222.848065][ T11] kthread (kernel/kthread.c:388) [ 222.848303][ T11] ? __pfx_kthread (kernel/kthread.c:341) [ 222.848546][ T11] ret_from_fork (arch/x86/kernel/process.c:147) [ 222.848784][ T11] ? __pfx_kthread (kernel/kthread.c:341) [ 222.849054][ T11] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | # udp tx: 11 MB/s 199 calls/s 199 msg/s | # udp rx: 11 MB/s 9696 calls/s | [ 245.219681][ T11] general protection fault, probably for non-canonical address 0xf999959999999999: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 245.220402][ T11] KASAN: maybe wild-memory-access in range [0xccccccccccccccc8-0xcccccccccccccccf] [ 245.221443][ T11] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 245.222114][ T11] Workqueue: netns cleanup_net [ 245.222398][ T11] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 245.222778][ 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 [ 245.223889][ T11] RSP: 0018:ffffc900000bf980 EFLAGS: 00010a07 [ 245.224235][ T11] RAX: 1999999999999999 RBX: cccccccccccccc9c RCX: dffffc0000000000 [ 245.224704][ T11] RDX: cccccccccccccccc RSI: 0000000000000004 RDI: ffff888006b58c44 [ 245.225150][ T11] RBP: 1ffff92000017f33 R08: 1ffff1100141721a R09: ffffc900000bf9b8 [ 245.225581][ T11] R10: ffffffffad750f57 R11: ffff88800a0b9000 R12: ffffed100141721a [ 245.225996][ T11] R13: ffff888006b58bc0 R14: ffff888005a14000 R15: ffff88800a0b9000 [ 245.226399][ T11] FS: 0000000000000000(0000) GS:ffff888035600000(0000) knlGS:0000000000000000 [ 245.226852][ T11] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 245.227190][ T11] CR2: 00007f53af858000 CR3: 0000000016134001 CR4: 0000000000770ef0 [ 245.227598][ T11] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 245.228003][ T11] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 245.228409][ T11] PKRU: 55555554 [ 245.228593][ T11] Call Trace: [ 245.228767][ T11] [ 245.228927][ T11] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 245.229148][ T11] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 245.229437][ T11] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 245.229734][ T11] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 245.230068][ T11] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 245.230415][ T11] ? nft_offload_netdev_event (net/netfilter/nf_tables_offload.c:677) nf_tables [ 245.230812][ T11] ? addrconf_notify (net/ipv6/addrconf.c:3753) [ 245.231109][ T11] notifier_call_chain (kernel/notifier.c:93) [ 245.231381][ T11] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 245.231711][ 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) [ 245.231971][ T11] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 245.232329][ T11] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 245.232660][ T11] ? __wake_up (kernel/sched/wait.c:110 kernel/sched/wait.c:127) [ 245.232885][ T11] default_device_exit_batch (net/core/dev.c:11629) [ 245.233208][ T11] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 245.233608][ 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) [ 245.233893][ 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) [ 245.234231][ T11] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 245.234486][ T11] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 245.234736][ T11] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 245.235017][ T11] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 245.235288][ T11] ? process_one_work (kernel/workqueue.c:2609) [ 245.235581][ T11] process_one_work (kernel/workqueue.c:2633) [ 245.235864][ 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) [ 245.236131][ T11] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 245.236421][ T11] ? assign_work (kernel/workqueue.c:1101) [ 245.236668][ T11] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 245.236933][ T11] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 245.237222][ T11] kthread (kernel/kthread.c:388) [ 245.237455][ T11] ? __pfx_kthread (kernel/kthread.c:341) [ 245.237699][ T11] ret_from_fork (arch/x86/kernel/process.c:147) [ 245.237954][ 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