====================================== | [ 15.301144][ T68] ================================================================== | [ 15.301539][ T68] BUG: KASAN: null-ptr-deref in try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) | [ 15.301866][ T68] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/68 | [ 15.302161][ T68] [ 15.302282][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 15.302286][ T68] Workqueue: netns cleanup_net [ 15.302294][ T68] Call Trace: [ 15.302297][ T68] [ 15.302299][ T68] dump_stack_lvl (lib/dump_stack.c:123) [ 15.302307][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 15.302310][ T68] kasan_report (mm/kasan/report.c:597) [ 15.302318][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 15.302323][ T68] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 15.302326][ T68] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 15.302329][ T68] ? netif_close_many (net/core/dev.c:1959) [ 15.302335][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 15.302338][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 15.302343][ T68] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 15.302347][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 15.302351][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 15.302355][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 15.302358][ T68] ? netif_close_many (net/core/dev.c:1959) [ 15.302363][ T68] netif_close_many (net/core/dev.c:1959) [ 15.302366][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 15.302371][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 15.302374][ T68] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 15.302379][ T68] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 15.302384][ T68] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 15.302389][ T68] ? mutex_is_locked (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2583 ./include/linux/atomic/atomic-long.h:38 ./include/linux/atomic/atomic-instrumented.h:3189 kernel/locking/mutex.h:47 kernel/locking/mutex.c:67) [ 15.302392][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 15.302396][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 15.302399][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 15.302402][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.302406][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.302412][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 15.302416][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 15.302422][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 15.302426][ T68] ? netns_get (net/core/net_namespace.c:223) [ 15.302428][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 15.302433][ T68] cleanup_net (net/core/net_namespace.c:698) [ 15.302437][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 15.302440][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.302447][ T68] process_one_work (kernel/workqueue.c:3268) [ 15.302453][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 15.302458][ T68] ? assign_work (kernel/workqueue.c:1206) [ 15.302462][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 15.302468][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 15.302471][ T68] kthread (kernel/kthread.c:463) [ 15.302475][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.302477][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 15.302485][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 15.302489][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.302492][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.302495][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 15.302498][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.302500][ T68] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 15.314353][ T68] #PF: error_code(0x0002) - not-present page | [ 15.314601][ T68] PGD 0 P4D 0 | [ 15.314757][ T68] Oops: Oops: 0002 [#1] SMP KASAN | [ 15.315420][ T68] Tainted: [B]=BAD_PAGE [ 15.315570][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 15.315819][ T68] Workqueue: netns cleanup_net [ 15.316036][ T68] RIP: 0010:try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 15.316291][ T68] Code: 00 41 89 c0 b8 01 00 00 00 45 85 c0 74 0f 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 be 08 00 00 00 48 89 df e8 7f 7f 81 00 48 0f ba 2b 00 72 11 48 83 c4 10 31 c0 5b 5d 41 5c 41 5d 41 5e All code ======== 0: 00 41 89 add %al,-0x77(%rcx) 3: c0 b8 01 00 00 00 45 sarb $0x45,0x1(%rax) a: 85 c0 test %eax,%eax c: 74 0f je 0x1d e: 48 83 c4 10 add $0x10,%rsp 12: 5b pop %rbx 13: 5d pop %rbp 14: 41 5c pop %r12 16: 41 5d pop %r13 18: 41 5e pop %r14 1a: 41 5f pop %r15 1c: c3 ret 1d: be 08 00 00 00 mov $0x8,%esi 22: 48 89 df mov %rbx,%rdi 25: e8 7f 7f 81 00 call 0x817fa9 2a:* f0 48 0f ba 2b 00 lock btsq $0x0,(%rbx) <-- trapping instruction 30: 72 11 jb 0x43 32: 48 83 c4 10 add $0x10,%rsp 36: 31 c0 xor %eax,%eax 38: 5b pop %rbx 39: 5d pop %rbp 3a: 41 5c pop %r12 3c: 41 5d pop %r13 3e: 41 5e pop %r14 Code starting with the faulting instruction =========================================== 0: f0 48 0f ba 2b 00 lock btsq $0x0,(%rbx) 6: 72 11 jb 0x19 8: 48 83 c4 10 add $0x10,%rsp c: 31 c0 xor %eax,%eax e: 5b pop %rbx f: 5d pop %rbp 10: 41 5c pop %r12 12: 41 5d pop %r13 14: 41 5e pop %r14 [ 15.316991][ T68] RSP: 0018:ffffc90000497690 EFLAGS: 00010046 [ 15.317253][ T68] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9823f90a [ 15.317550][ T68] RDX: fffffbfff388b6cd RSI: 0000000000000008 RDI: ffffffff9c45b660 [ 15.317848][ T68] RBP: ffffc900004976f8 R08: 0000000000000001 R09: fffffbfff388b6cc [ 15.318142][ T68] R10: ffffffff9c45b667 R11: ffffc90000497180 R12: 0000000000000000 [ 15.318444][ T68] R13: 0000000000000286 R14: ffff88800cd54000 R15: dffffc0000000000 [ 15.318749][ T68] FS: 0000000000000000(0000) GS:ffff888099f10000(0000) knlGS:0000000000000000 [ 15.319089][ T68] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.319337][ T68] CR2: 0000000000000000 CR3: 0000000029735005 CR4: 0000000000772ef0 [ 15.319633][ T68] PKRU: 55555554 [ 15.319784][ T68] Call Trace: [ 15.319938][ T68] [ 15.320040][ T68] ? netif_close_many (net/core/dev.c:1959) [ 15.320245][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 15.320442][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 15.320638][ T68] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 15.320833][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 15.321028][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 15.321222][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 15.321423][ T68] ? netif_close_many (net/core/dev.c:1959) [ 15.321616][ T68] netif_close_many (net/core/dev.c:1959) [ 15.321827][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 15.322027][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 15.322224][ T68] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 15.322468][ T68] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 15.322714][ T68] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 15.322910][ T68] ? mutex_is_locked (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2583 ./include/linux/atomic/atomic-long.h:38 ./include/linux/atomic/atomic-instrumented.h:3189 kernel/locking/mutex.h:47 kernel/locking/mutex.c:67) [ 15.323111][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 15.323307][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 15.323506][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 15.323752][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.323948][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.324150][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 15.324350][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 15.324547][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 15.324744][ T68] ? netns_get (net/core/net_namespace.c:223) [ 15.324941][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 15.325146][ T68] cleanup_net (net/core/net_namespace.c:698) [ 15.325340][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 15.325564][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.325728][ T68] process_one_work (kernel/workqueue.c:3268) [ 15.325893][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 15.326056][ T68] ? assign_work (kernel/workqueue.c:1206) [ 15.326270][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 15.326465][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 15.326658][ T68] kthread (kernel/kthread.c:463) [ 15.326804][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.326996][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 15.327193][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 15.327388][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.327586][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.327780][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 15.327975][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) Finger prints: kasan_report:kasan_check_range:try_to_grab_pending:__cancel_work:__cancel_work_sync try_to_grab_pending:__cancel_work:__cancel_work_sync:__dev_close_many:netif_close_many