====================================== | xx__-> [ 30.382426][ T68] ================================================================== | [ 30.382781][ T68] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 30.383085][ T68] Read of size 1 at addr ffff8880080f96c4 by task kworker/u16:1/68 | [ 30.383352][ T68] [ 30.383461][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 30.383465][ T68] Workqueue: netns cleanup_net [ 30.383479][ T68] Call Trace: [ 30.383483][ T68] [ 30.383486][ T68] dump_stack_lvl (lib/dump_stack.c:123) [ 30.383494][ T68] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 30.383503][ T68] ? kobject_put (lib/kobject.c:733) [ 30.383507][ T68] print_report (mm/kasan/report.c:483) [ 30.383510][ T68] ? kobject_put (lib/kobject.c:733) [ 30.383514][ T68] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 30.383517][ T68] ? kobject_put (lib/kobject.c:733) [ 30.383520][ T68] kasan_report (mm/kasan/report.c:597) [ 30.383524][ T68] ? kobject_put (lib/kobject.c:733) [ 30.383530][ T68] kobject_put (lib/kobject.c:733) [ 30.383533][ T68] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 30.383543][ T68] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 30.383547][ T68] ? generic_xdp_install (net/core/dev.c:11630) [ 30.383550][ T68] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 30.383561][ T68] ops_undo_list (net/core/net_namespace.c:190 net/core/net_namespace.c:248) [ 30.383567][ T68] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 30.383570][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 30.383576][ T68] cleanup_net (net/core/net_namespace.c:698) [ 30.383581][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 30.383586][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.383594][ T68] process_one_work (kernel/workqueue.c:3268) [ 30.383608][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 30.383614][ T68] ? assign_work (kernel/workqueue.c:1206) [ 30.383618][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 30.383624][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 30.383628][ T68] kthread (kernel/kthread.c:463) [ 30.383632][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.383635][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 30.383643][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 30.383648][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.383652][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.383655][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 30.383658][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.383661][ T68] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 30.412868][ T68] refcount_t: underflow; use-after-free. | [ 30.413177][ T68] WARNING: CPU: 0 PID: 68 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 30.413655][ T68] Modules linked in: [last unloaded: test_bpf] | [ 30.415599][ T68] Tainted: [B]=BAD_PAGE [ 30.415928][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 30.416282][ T68] Workqueue: netns cleanup_net [ 30.416583][ T68] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 30.417063][ T68] Code: cc 38 03 80 fb 01 0f 87 29 33 d7 fe 83 e3 01 0f 85 51 ff ff ff c6 05 17 cc 38 03 01 90 48 c7 c7 40 ba a5 ba e8 62 d6 16 ff 90 <0f> 0b 90 90 e9 33 ff ff ff 48 89 df e8 c0 9d a0 ff e9 ba fe ff ff All code ======== 0: cc int3 1: 38 03 cmp %al,(%rbx) 3: 80 fb 01 cmp $0x1,%bl 6: 0f 87 29 33 d7 fe ja 0xfffffffffed73335 c: 83 e3 01 and $0x1,%ebx f: 0f 85 51 ff ff ff jne 0xffffffffffffff66 15: c6 05 17 cc 38 03 01 movb $0x1,0x338cc17(%rip) # 0x338cc33 1c: 90 nop 1d: 48 c7 c7 40 ba a5 ba mov $0xffffffffbaa5ba40,%rdi 24: e8 62 d6 16 ff call 0xffffffffff16d68b 29: 90 nop 2a:* 0f 0b ud2 <-- trapping instruction 2c: 90 nop 2d: 90 nop 2e: e9 33 ff ff ff jmp 0xffffffffffffff66 33: 48 89 df mov %rbx,%rdi 36: e8 c0 9d a0 ff call 0xffffffffffa09dfb 3b: e9 ba fe ff ff jmp 0xfffffffffffffefa Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 90 nop 3: 90 nop 4: e9 33 ff ff ff jmp 0xffffffffffffff3c 9: 48 89 df mov %rbx,%rdi c: e8 c0 9d a0 ff call 0xffffffffffa09dd1 11: e9 ba fe ff ff jmp 0xfffffffffffffed0 [ 30.418158][ T68] RSP: 0000:ffffc90000497a08 EFLAGS: 00010282 [ 30.418523][ T68] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 30.419051][ T68] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 30.419464][ T68] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff7740934 [ 30.419983][ T68] R10: 0000000000000003 R11: ffffc90000497580 R12: 0000000000000001 [ 30.420390][ T68] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 30.420911][ T68] FS: 0000000000000000(0000) GS:ffff8880b0108000(0000) knlGS:0000000000000000 [ 30.421406][ T68] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 30.421756][ T68] CR2: 00007fd80a069658 CR3: 0000000015fe7001 CR4: 0000000000772ef0 [ 30.422294][ T68] PKRU: 55555554 [ 30.422514][ T68] Call Trace: [ 30.422721][ T68] [ 30.422984][ T68] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 30.423269][ T68] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 30.423547][ T68] ? generic_xdp_install (net/core/dev.c:11630) [ 30.423945][ T68] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 30.424231][ T68] ops_undo_list (net/core/net_namespace.c:190 net/core/net_namespace.c:248) [ 30.424507][ T68] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 30.424904][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 30.425347][ T68] cleanup_net (net/core/net_namespace.c:698) [ 30.425611][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 30.425993][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.426269][ T68] process_one_work (kernel/workqueue.c:3268) [ 30.426541][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 30.426934][ T68] ? assign_work (kernel/workqueue.c:1206) [ 30.427370][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 30.427654][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 30.428037][ T68] kthread (kernel/kthread.c:463) [ 30.428402][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.428671][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 30.429053][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 30.429502][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.429890][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.430328][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 30.430604][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) Finger prints: print_report:kasan_report:kobject_put:netdev_run_todo:ops_undo_list refcount_warn_saturate:netdev_run_todo:ops_undo_list:cleanup_net:process_one_work