================================================================== BUG: KASAN: slab-use-after-free in __lock_acquire+0x2da1/0x3b40 kernel/locking/lockdep.c:5005 Read of size 8 at addr ffff88803c426418 by task pool_workqueue_/3 CPU: 3 PID: 3 Comm: pool_workqueue_ Not tainted 6.8.0-rc3-syzkaller-00279-g4a7bbe7519b6 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 __lock_acquire+0x2da1/0x3b40 kernel/locking/lockdep.c:5005 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 p9_tag_remove net/9p/client.c:394 [inline] p9_req_put net/9p/client.c:402 [inline] p9_req_put+0xca/0x250 net/9p/client.c:399 req_done+0x1e7/0x2f0 net/9p/trans_virtio.c:147 vring_interrupt drivers/virtio/virtio_ring.c:2595 [inline] vring_interrupt+0x31b/0x400 drivers/virtio/virtio_ring.c:2570 __handle_irq_event_percpu+0x22a/0x750 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x263/0xd10 kernel/irq/chip.c:831 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline] handle_irq arch/x86/kernel/irq.c:238 [inline] __common_interrupt+0xde/0x250 arch/x86/kernel/irq.c:257 common_interrupt+0x52/0xd0 arch/x86/kernel/irq.c:247 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:640 RIP: 0010:__do_softirq+0x1e0/0x8e7 kernel/softirq.c:539 Code: 89 44 24 18 44 88 74 24 3b 48 c7 c7 c0 59 0b 8b e8 25 35 fc ff 65 66 c7 05 b3 62 3c 75 00 00 e8 a6 f4 ca f6 fb bb ff ff ff ff <49> c7 c6 c0 a0 40 8d 41 0f bc dc 83 c3 01 0f 85 a7 00 00 00 e9 70 RSP: 0018:ffffc900008e8f30 EFLAGS: 00000206 RAX: 000000000004311e RBX: 00000000ffffffff RCX: 1ffffffff1f3a331 RDX: 0000000000000000 RSI: ffffffff8b0cb340 RDI: ffffffff8b6e9440 RBP: 000000010000fa26 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff8f9d4c17 R11: 0000000000000000 R12: 0000000000000282 R13: 000000000000000a R14: 0000000000000001 R15: 0000000000000000 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu kernel/softirq.c:632 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:preempt_schedule_irq+0x4d/0x90 kernel/sched/core.c:7047 Code: 55 65 48 8b 2c 25 40 c2 03 00 53 48 89 eb 48 c1 eb 03 48 01 c3 bf 01 00 00 00 e8 ce c1 96 f6 e8 a9 50 cc f6 fb bf 01 00 00 00 9e 93 ff ff 9c 58 fa f6 c4 02 75 1e bf 01 00 00 00 e8 fc 6f 96 RSP: 0018:ffffc90000067d48 EFLAGS: 00000202 RAX: 0000000000043119 RBX: ffffed1002cdb900 RCX: 1ffffffff1f3a331 RDX: 0000000000000000 RSI: ffffffff8b0cb340 RDI: 0000000000000001 RBP: ffff8880166dc800 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff8f9d4c17 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 irqentry_exit+0x36/0x90 kernel/entry/common.c:348 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:654 RIP: 0010:lockdep_unregister_key+0x1ab/0x280 kernel/locking/lockdep.c:6476 Code: 5f d3 93 48 89 df e8 54 fd ff ff 48 89 df e8 4c d9 ff ff e8 47 db ff ff 9c 58 f6 c4 02 75 66 41 f7 c5 00 02 00 00 74 01 fb 5b <5d> 41 5c 41 5d 41 5e 41 5f e9 57 c5 09 00 48 c7 c0 d8 7f 9d 8f 48 RSP: 0018:ffffc90000067e10 EFLAGS: 00000206 RAX: 0000000000000046 RBX: 0000000000000002 RCX: 0000000000000001 RDX: dffffc0000000000 RSI: ffffffff8b0cb600 RDI: ffffffff8b6e9440 RBP: ffff88801da65928 R08: 1ffff1100d6a7b74 R09: 000000001fffffff R10: 0000000013d35f60 R11: ffffffff8b0e3760 R12: 0000000000000000 R13: 0000000000000246 R14: ffffffff93ed8d58 R15: ffff88801da65930 wq_unregister_lockdep kernel/workqueue.c:3908 [inline] pwq_release_workfn+0x231/0x380 kernel/workqueue.c:4140 kthread_worker_fn+0x303/0xad0 kernel/kthread.c:841 kthread+0x2c6/0x3b0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Allocated by task 11022: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:372 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:389 kmalloc include/linux/slab.h:590 [inline] p9_client_create+0xcf/0x1220 net/9p/client.c:980 v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc6/0xcd0 fs/9p/vfs_super.c:123 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1784 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14ea/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x297/0x320 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 Freed by task 11022: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1c0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kfree+0x124/0x370 mm/slub.c:4409 p9_client_create+0xa1f/0x1220 net/9p/client.c:1051 v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc6/0xcd0 fs/9p/vfs_super.c:123 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1784 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14ea/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x297/0x320 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 The buggy address belongs to the object at ffff88803c426400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of freed 512-byte region [ffff88803c426400, ffff88803c426600) The buggy address belongs to the physical page: page:ffffea0000f10900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3c424 head:ffffea0000f10900 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888014c42c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5191, tgid 5191 (syz-executor.3), ts 72304358450, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmalloc_trace+0x30b/0x340 mm/slub.c:4007 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:711 [inline] mca_alloc net/ipv6/mcast.c:880 [inline] __ipv6_dev_mc_inc+0x2b7/0xc50 net/ipv6/mcast.c:936 ipv6_add_dev+0xa7c/0x13e0 net/ipv6/addrconf.c:465 addrconf_notify+0x546/0x18f0 net/ipv6/addrconf.c:3593 notifier_call_chain+0xb9/0x3c0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1966 call_netdevice_notifiers_extack net/core/dev.c:2004 [inline] call_netdevice_notifiers net/core/dev.c:2018 [inline] register_netdevice+0x16ef/0x1db0 net/core/dev.c:10294 ipcaif_newlink+0x50/0x290 net/caif/chnl_net.c:453 rtnl_newlink_create net/core/rtnetlink.c:3515 [inline] __rtnl_newlink+0x1197/0x1960 net/core/rtnetlink.c:3735 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3748 page_owner free stack trace missing Memory state around the buggy address: ffff88803c426300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803c426380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803c426400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803c426480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88803c426500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 89 44 24 18 mov %eax,0x18(%rsp) 4: 44 88 74 24 3b mov %r14b,0x3b(%rsp) 9: 48 c7 c7 c0 59 0b 8b mov $0xffffffff8b0b59c0,%rdi 10: e8 25 35 fc ff call 0xfffc353a 15: 65 66 c7 05 b3 62 3c movw $0x0,%gs:0x753c62b3(%rip) # 0x753c62d2 1c: 75 00 00 1f: e8 a6 f4 ca f6 call 0xf6caf4ca 24: fb sti 25: bb ff ff ff ff mov $0xffffffff,%ebx * 2a: 49 c7 c6 c0 a0 40 8d mov $0xffffffff8d40a0c0,%r14 <-- trapping instruction 31: 41 0f bc dc bsf %r12d,%ebx 35: 83 c3 01 add $0x1,%ebx 38: 0f 85 a7 00 00 00 jne 0xe5 3e: e9 .byte 0xe9 3f: 70 .byte 0x70