====================================== | [ 46.451133][ T71] ================================================================== | [ 46.451625][ 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 | [ 46.452133][ T71] Read of size 8 at addr ffff888006c28bf0 by task kworker/u8:1/71 | [ 46.452570][ T71] [ 46.453117][ T71] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 46.453799][ T71] Workqueue: netns cleanup_net [ 46.454072][ T71] Call Trace: [ 46.454254][ T71] [ 46.454415][ T71] dump_stack_lvl (lib/dump_stack.c:107) [ 46.454656][ T71] print_address_description.constprop.0 (mm/kasan/report.c:378) [ 46.455021][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 46.455379][ T71] print_report (mm/kasan/report.c:489) [ 46.455634][ 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) [ 46.455896][ T71] kasan_report (mm/kasan/report.c:603) [ 46.456129][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 46.456460][ T71] vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 46.456781][ T71] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 46.457146][ T71] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 46.457441][ T71] notifier_call_chain (kernel/notifier.c:93) [ 46.457716][ T71] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 46.458045][ 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) [ 46.458295][ T71] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 46.458641][ T71] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 46.458966][ T71] default_device_exit_batch (net/core/dev.c:11629) [ 46.459259][ T71] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 46.459577][ 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) [ 46.459823][ 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) [ 46.460130][ T71] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 46.460363][ T71] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 46.460653][ T71] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 46.460910][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 46.461154][ T71] ? process_one_work (kernel/workqueue.c:2609) [ 46.461422][ T71] process_one_work (kernel/workqueue.c:2633) [ 46.461679][ 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) [ 46.461915][ T71] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 46.462196][ T71] ? assign_work (kernel/workqueue.c:1101) [ 46.462458][ T71] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 46.462718][ T71] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 46.463074][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 46.463368][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 46.463644][ T71] kthread (kernel/kthread.c:388) [ 46.463863][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 46.464110][ T71] ret_from_fork (arch/x86/kernel/process.c:147) [ 46.464365][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 46.464604][ T71] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) | [ 72.817206][ T71] swp1: left promiscuous mode | [ 72.817572][ T71] br0: port 1(swp1) entered disabled state | [ 72.905255][ T71] general protection fault, probably for non-canonical address 0xed6d696d6d6d6d6d: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 72.905911][ T71] KASAN: maybe wild-memory-access in range [0x6b6b6b6b6b6b6b68-0x6b6b6b6b6b6b6b6f] [ 72.906906][ T71] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 72.907686][ T71] Workqueue: netns cleanup_net [ 72.907953][ T71] RIP: 0010:vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 72.908351][ 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 [ 72.909497][ T71] RSP: 0018:ffffc9000051f980 EFLAGS: 00010202 [ 72.909840][ T71] RAX: 0d6d6d6d6d6d6d6d RBX: 6b6b6b6b6b6b6b3b RCX: dffffc0000000000 [ 72.910297][ T71] RDX: 6b6b6b6b6b6b6b6b RSI: 0000000000000004 RDI: ffff888007770c44 [ 72.910724][ T71] RBP: 1ffff920000a3f33 R08: 1ffff11000d4f81a R09: ffffc9000051f9b8 [ 72.911133][ T71] R10: ffffffffaff50f57 R11: ffff888006a7c000 R12: ffffed1000d4f81a [ 72.911546][ T71] R13: ffff888007770bc0 R14: ffff888006a74000 R15: ffff888006a7c000 [ 72.911952][ T71] FS: 0000000000000000(0000) GS:ffff888035a00000(0000) knlGS:0000000000000000 [ 72.912410][ T71] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 72.912756][ T71] CR2: 00007fb2f3420d40 CR3: 0000000011934001 CR4: 0000000000770ef0 [ 72.913209][ T71] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 72.913663][ T71] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 72.914116][ T71] PKRU: 55555554 [ 72.914303][ T71] Call Trace: [ 72.914479][ T71] [ 72.914639][ T71] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 72.914858][ T71] ? exc_general_protection (arch/x86/kernel/traps.c:701 arch/x86/kernel/traps.c:643) [ 72.915155][ T71] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:564) [ 72.915455][ T71] ? vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4613 drivers/net/vxlan/vxlan_core.c:4636) vxlan [ 72.915792][ T71] ? __pfx_vxlan_netdevice_event (drivers/net/vxlan/vxlan_core.c:4631) vxlan [ 72.916139][ T71] ? netconsole_netdev_event (drivers/net/netconsole.c:991) [ 72.916436][ T71] ? addrconf_notify (net/ipv6/addrconf.c:3753) [ 72.916697][ T71] notifier_call_chain (kernel/notifier.c:93) [ 72.916977][ T71] unregister_netdevice_many_notify (net/core/dev.c:11095) [ 72.917309][ 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) [ 72.917596][ T71] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11035) [ 72.918003][ T71] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11019) [ 72.918348][ T71] ? __wake_up (kernel/sched/wait.c:110 kernel/sched/wait.c:127) [ 72.918602][ T71] default_device_exit_batch (net/core/dev.c:11629) [ 72.918924][ T71] ? __pfx_default_device_exit_batch (net/core/dev.c:11604) [ 72.919280][ T71] ? nexthop_net_exit_batch_rtnl (net/ipv4/nexthop.c:2424 net/ipv4/nexthop.c:3754) [ 72.919635][ T71] cleanup_net (net/core/net_namespace.c:636 (discriminator 3)) [ 72.919883][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 72.920137][ T71] ? __pfx_cleanup_net (net/core/net_namespace.c:581) [ 72.920444][ T71] ? lock_acquire (./include/trace/events/lock.h:24 kernel/locking/lockdep.c:5725) [ 72.920741][ T71] ? process_one_work (kernel/workqueue.c:2609) [ 72.921037][ T71] process_one_work (kernel/workqueue.c:2633) [ 72.921317][ 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) [ 72.921556][ T71] ? __pfx_process_one_work (kernel/workqueue.c:2542) [ 72.921836][ T71] ? assign_work (kernel/workqueue.c:1101) [ 72.922077][ T71] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787) [ 72.922321][ T71] ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4300 kernel/locking/lockdep.c:4359) [ 72.922664][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 72.922930][ T71] ? __pfx_worker_thread (kernel/workqueue.c:2733) [ 72.923196][ T71] kthread (kernel/kthread.c:388) [ 72.923410][ T71] ? __pfx_kthread (kernel/kthread.c:341) [ 72.923651][ T71] ret_from_fork (arch/x86/kernel/process.c:147) [ 72.923918][ 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