================================================================== BUG: KASAN: slab-use-after-free in __lock_acquire+0x2dd6/0x3b30 kernel/locking/lockdep.c:5005 Read of size 8 at addr ffff888011611818 by task syz-executor.2/5774 CPU: 0 PID: 5774 Comm: syz-executor.2 Not tainted 6.9.0-syzkaller-01893-g6bfd2d442af5 #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+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 __lock_acquire+0x2dd6/0x3b30 kernel/locking/lockdep.c:5005 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 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:395 [inline] p9_req_put net/9p/client.c:403 [inline] p9_req_put+0xca/0x250 net/9p/client.c:400 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+0x229/0x7c0 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:173 [inline] handle_irq arch/x86/kernel/irq.c:238 [inline] __common_interrupt+0xde/0x250 arch/x86/kernel/irq.c:257 common_interrupt+0xab/0xd0 arch/x86/kernel/irq.c:247 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline] RIP: 0010:__orc_find+0xb2/0x130 arch/x86/kernel/unwind_orc.c:102 Code: c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 75 73 <49> 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 2c d0 51 00 4d 39 ec 73 RSP: 0018:ffffc90002d4f3a0 EFLAGS: 00000246 RAX: 0000000000000003 RBX: ffffffff902072cc RCX: 0000000000000000 RDX: 0000000000000003 RSI: ffffffff813ccb5a RDI: 0000000000000005 RBP: ffffffff902072e4 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000001 R12: ffffffff8ae01e90 R13: ffffffff90d5a786 R14: dffffc0000000000 R15: ffffffff902072d8 orc_find arch/x86/kernel/unwind_orc.c:227 [inline] unwind_next_frame+0x335/0x23a0 arch/x86/kernel/unwind_orc.c:494 arch_stack_walk+0x100/0x170 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x95/0xd0 kernel/stacktrace.c:122 save_stack+0x162/0x1f0 mm/page_owner.c:156 __reset_page_owner+0x8d/0x400 mm/page_owner.c:302 reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2347 free_unref_folios+0x256/0xad0 mm/page_alloc.c:2536 folios_put_refs+0x487/0x6d0 mm/swap.c:1034 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x334/0xe90 mm/truncate.c:362 ext4_evict_inode+0x2cc/0x17d0 fs/ext4/inode.c:193 evict+0x2ed/0x6c0 fs/inode.c:667 iput_final fs/inode.c:1741 [inline] iput.part.0+0x5a8/0x7f0 fs/inode.c:1767 iput+0x5c/0x80 fs/inode.c:1757 do_unlinkat+0x613/0x750 fs/namei.c:4414 __do_sys_unlink fs/namei.c:4455 [inline] __se_sys_unlink fs/namei.c:4453 [inline] __ia32_sys_unlink+0xc6/0x110 fs/namei.c:4453 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf72d9579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000ffd6d63c EFLAGS: 00000292 ORIG_RAX: 000000000000000a RAX: ffffffffffffffda RBX: 00000000ffd6d6e0 RCX: 0000000000008000 RDX: 00000000f7430ff4 RSI: 0000000000000000 RDI: 00000000ffd6e784 RBP: 00000000ffd6d6e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6784: 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:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kmalloc include/linux/slab.h:628 [inline] p9_client_create+0xcf/0x11b0 net/9p/client.c:981 v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc6/0xaa0 fs/9p/vfs_super.c:122 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1779 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x6e1/0x1f10 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] __ia32_sys_mount+0x295/0x320 fs/namespace.c:3875 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 6784: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:240 [inline] __kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4353 [inline] kfree+0x129/0x3a0 mm/slub.c:4463 p9_client_create+0x9ca/0x11b0 net/9p/client.c:1052 v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc6/0xaa0 fs/9p/vfs_super.c:122 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1779 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x6e1/0x1f10 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] __ia32_sys_mount+0x295/0x320 fs/namespace.c:3875 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888011611800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of freed 512-byte region [ffff888011611800, ffff888011611a00) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11610 head: 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 ffffea0000adf800 dead000000000002 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff00000000840 ffff888014c42c80 ffffea0000adf800 dead000000000002 head: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff00000000002 ffffea0000458401 dead000000000122 00000000ffffffff head: 0000000400000000 0000000000000000 00000000ffffffff 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 5220, tgid 5220 (syz-executor.2), ts 51274038129, free_ts 51263725014 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3317 __alloc_pages+0x22b/0x2460 mm/page_alloc.c:4575 __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:2353 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2406 ___slab_alloc+0xd28/0x1810 mm/slub.c:3592 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3682 __slab_alloc_node mm/slub.c:3735 [inline] slab_alloc_node mm/slub.c:3908 [inline] __do_kmalloc_node mm/slub.c:4038 [inline] __kmalloc+0x3bf/0x440 mm/slub.c:4052 kmalloc include/linux/slab.h:632 [inline] kzalloc include/linux/slab.h:749 [inline] new_dir fs/proc/proc_sysctl.c:956 [inline] get_subdir fs/proc/proc_sysctl.c:1000 [inline] sysctl_mkdir_p fs/proc/proc_sysctl.c:1295 [inline] __register_sysctl_table+0xda8/0x16f0 fs/proc/proc_sysctl.c:1376 __addrconf_sysctl_register+0x208/0x3f0 net/ipv6/addrconf.c:7216 addrconf_sysctl_register net/ipv6/addrconf.c:7264 [inline] addrconf_sysctl_register+0x15f/0x1f0 net/ipv6/addrconf.c:7253 ipv6_add_dev+0xa11/0x13f0 net/ipv6/addrconf.c:455 addrconf_notify+0x546/0x19e0 net/ipv6/addrconf.c:3651 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1950 call_netdevice_notifiers_extack net/core/dev.c:1988 [inline] call_netdevice_notifiers net/core/dev.c:2002 [inline] register_netdevice+0x157d/0x1c40 net/core/dev.c:10316 veth_newlink+0x363/0xa10 drivers/net/veth.c:1828 page last free pid 5217 tgid 5217 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2347 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2487 __put_partials+0x14c/0x170 mm/slub.c:2920 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3871 [inline] slab_alloc_node mm/slub.c:3918 [inline] kmalloc_trace+0x147/0x340 mm/slub.c:4065 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] kset_create lib/kobject.c:965 [inline] kset_create_and_add+0x4d/0x190 lib/kobject.c:1008 register_queue_kobjects net/core/net-sysfs.c:1887 [inline] netdev_register_kobject+0x1cd/0x3f0 net/core/net-sysfs.c:2140 register_netdevice+0x12c8/0x1c40 net/core/dev.c:10283 geneve_configure+0x68b/0x9e0 drivers/net/geneve.c:1373 geneve_newlink+0x125/0x2b0 drivers/net/geneve.c:1624 rtnl_newlink_create net/core/rtnetlink.c:3494 [inline] __rtnl_newlink+0x119c/0x1960 net/core/rtnetlink.c:3714 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3727 rtnetlink_rcv_msg+0x3c7/0xe60 net/core/rtnetlink.c:6595 netlink_rcv_skb+0x165/0x410 net/netlink/af_netlink.c:2559 Memory state around the buggy address: ffff888011611700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011611780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011611800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011611880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011611900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: c1 fa 02 sar $0x2,%edx 3: 48 01 d0 add %rdx,%rax 6: 48 d1 f8 sar %rax 9: 4c 8d 3c 83 lea (%rbx,%rax,4),%r15 d: 4c 89 fa mov %r15,%rdx 10: 48 c1 ea 03 shr $0x3,%rdx 14: 42 0f b6 0c 32 movzbl (%rdx,%r14,1),%ecx 19: 4c 89 fa mov %r15,%rdx 1c: 83 e2 07 and $0x7,%edx 1f: 83 c2 03 add $0x3,%edx 22: 38 ca cmp %cl,%dl 24: 7c 04 jl 0x2a 26: 84 c9 test %cl,%cl 28: 75 73 jne 0x9d * 2a: 49 63 17 movslq (%r15),%rdx <-- trapping instruction 2d: 4c 89 e7 mov %r12,%rdi 30: 4d 8d 2c 17 lea (%r15,%rdx,1),%r13 34: 4c 89 ee mov %r13,%rsi 37: e8 2c d0 51 00 call 0x51d068 3c: 4d 39 ec cmp %r13,%r12 3f: 73 .byte 0x73