================================================================== BUG: KASAN: slab-use-after-free in __lock_acquire+0x4208/0x5de0 kernel/locking/lockdep.c:5004 Read of size 8 at addr ffff888022a9bc18 by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.0-rc5-syzkaller-00192-g10a6e5feccb8 #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:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 __lock_acquire+0x4208/0x5de0 kernel/locking/lockdep.c:5004 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x50 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+0xc6/0x250 net/9p/client.c:399 req_done+0x1e7/0x2e0 net/9p/trans_virtio.c:147 vring_interrupt drivers/virtio/virtio_ring.c:2595 [inline] vring_interrupt+0x317/0x3f0 drivers/virtio/virtio_ring.c:2570 __handle_irq_event_percpu+0x22a/0x740 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+0x261/0xcf0 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+0xdb/0x240 arch/x86/kernel/irq.c:257 common_interrupt+0xa9/0xd0 arch/x86/kernel/irq.c:247 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636 RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:37 [inline] RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:72 [inline] RIP: 0010:default_idle+0xf/0x20 arch/x86/kernel/process.c:743 Code: 89 07 49 c7 c0 08 00 00 00 4d 29 c8 4c 01 c7 4c 29 c2 e9 76 ff ff ff cc cc cc cc f3 0f 1e fa 66 90 0f 00 2d 93 99 46 00 fb f4 c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 f3 0f 1e fa 65 RSP: 0018:ffffc90000457e08 EFLAGS: 00000246 RAX: 00000000001cb8a3 RBX: 0000000000000001 RCX: ffffffff8a3ff95e RDX: 0000000000000000 RSI: ffffffff8a8cab20 RDI: ffffffff8ae92ce0 RBP: ffffed1002857000 R08: 0000000000000001 R09: ffffed10058e6dbd R10: ffff88802c736deb R11: 0000000000000000 R12: 0000000000000001 R13: ffff8880142b8000 R14: ffffffff8ece2890 R15: 0000000000000000 default_idle_call+0x67/0xa0 kernel/sched/idle.c:97 cpuidle_idle_call kernel/sched/idle.c:170 [inline] do_idle+0x32e/0x3f0 kernel/sched/idle.c:282 cpu_startup_entry+0x50/0x60 kernel/sched/idle.c:380 start_secondary+0x20e/0x2a0 arch/x86/kernel/smpboot.c:326 secondary_startup_64_no_verify+0x166/0x16b Allocated by task 9602: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:599 [inline] p9_client_create+0xcf/0x1210 net/9p/client.c:978 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:638 vfs_get_tree+0x8c/0x370 fs/super.c:1750 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __ia32_sys_mount+0x291/0x310 fs/namespace.c:3861 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Freed by task 9602: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822 p9_client_create+0xa14/0x1210 net/9p/client.c:1049 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:638 vfs_get_tree+0x8c/0x370 fs/super.c:1750 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __ia32_sys_mount+0x291/0x310 fs/namespace.c:3861 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 insert_work+0x38/0x230 kernel/workqueue.c:1647 __queue_work+0x5d0/0x1050 kernel/workqueue.c:1799 call_timer_fn+0x19e/0x580 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1746 [inline] __run_timers+0x585/0xb10 kernel/time/timer.c:2022 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035 __do_softirq+0x218/0x965 kernel/softirq.c:553 Second to last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 insert_work+0x38/0x230 kernel/workqueue.c:1647 __queue_work+0xb77/0x1050 kernel/workqueue.c:1803 call_timer_fn+0x19e/0x580 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1746 [inline] __run_timers+0x585/0xb10 kernel/time/timer.c:2022 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035 __do_softirq+0x218/0x965 kernel/softirq.c:553 The buggy address belongs to the object at ffff888022a9bc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of freed 512-byte region [ffff888022a9bc00, ffff888022a9be00) The buggy address belongs to the physical page: page:ffffea00008aa600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22a98 head:ffffea00008aa600 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 ffff888012c42c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 7511, tgid 7500 (syz-executor.1), ts 193769937218, free_ts 193574713166 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 kmalloc_trace+0x25/0xe0 mm/slab_common.c:1114 kmalloc include/linux/slab.h:599 [inline] kzalloc include/linux/slab.h:720 [inline] mca_alloc net/ipv6/mcast.c:880 [inline] __ipv6_dev_mc_inc+0x2b7/0xc40 net/ipv6/mcast.c:936 ipv6_add_dev+0xa85/0x13d0 net/ipv6/addrconf.c:466 addrconf_notify+0x55c/0x1920 net/ipv6/addrconf.c:3589 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1970 call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] register_netdevice+0xf84/0x1490 net/core/dev.c:10173 br_dev_newlink+0x27/0x110 net/bridge/br_netlink.c:1552 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x180/0x3f0 mm/slub.c:3523 __alloc_skb+0x287/0x330 net/core/skbuff.c:640 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6313 sock_alloc_send_pskb+0x7e4/0x970 net/core/sock.c:2795 unix_dgram_sendmsg+0x455/0x1c30 net/unix/af_unix.c:1953 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x2ac/0x940 net/socket.c:2558 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2612 __sys_sendmmsg+0x2a5/0x450 net/socket.c:2691 __compat_sys_sendmmsg net/compat.c:360 [inline] __do_compat_sys_sendmmsg net/compat.c:367 [inline] __se_compat_sys_sendmmsg net/compat.c:364 [inline] __ia32_compat_sys_sendmmsg+0x9d/0x100 net/compat.c:364 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178 Memory state around the buggy address: ffff888022a9bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888022a9bb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888022a9bc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888022a9bc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888022a9bd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 89 07 mov %eax,(%rdi) 2: 49 c7 c0 08 00 00 00 mov $0x8,%r8 9: 4d 29 c8 sub %r9,%r8 c: 4c 01 c7 add %r8,%rdi f: 4c 29 c2 sub %r8,%rdx 12: e9 76 ff ff ff jmp 0xffffff8d 17: cc int3 18: cc int3 19: cc int3 1a: cc int3 1b: f3 0f 1e fa endbr64 1f: 66 90 xchg %ax,%ax 21: 0f 00 2d 93 99 46 00 verw 0x469993(%rip) # 0x4699bb 28: fb sti 29: f4 hlt * 2a: fa cli <-- trapping instruction 2b: c3 ret 2c: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) 33: 00 00 00 00 37: 0f 1f 40 00 nopl 0x0(%rax) 3b: f3 0f 1e fa endbr64 3f: 65 gs