================================================================== BUG: KASAN: slab-use-after-free in __lock_acquire+0x2d90/0x3c40 kernel/locking/lockdep.c:5089 Read of size 8 at addr ffff88805035b418 by task syz-executor/6112 CPU: 3 UID: 0 PID: 6112 Comm: syz-executor Not tainted 6.13.0-rc5-syzkaller-00163-gab75170520d4 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 __lock_acquire+0x2d90/0x3c40 kernel/locking/lockdep.c:5089 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5849 __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:397 [inline] p9_req_put net/9p/client.c:405 [inline] p9_req_put+0xaf/0x250 net/9p/client.c:402 req_done+0x1e7/0x2f0 net/9p/trans_virtio.c:147 vring_interrupt drivers/virtio/virtio_ring.c:2715 [inline] vring_interrupt+0x31b/0x400 drivers/virtio/virtio_ring.c:2690 __handle_irq_event_percpu+0x229/0x7d0 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:247 [inline] call_irq_handler arch/x86/kernel/irq.c:259 [inline] __common_interrupt+0xdf/0x250 arch/x86/kernel/irq.c:285 common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:__sanitizer_cov_trace_pc+0x41/0x70 kernel/kcov.c:217 Code: 00 48 8b 34 24 74 1d f6 c4 01 74 43 a9 00 00 0f 00 75 3c a9 00 00 f0 00 75 35 8b 82 1c 16 00 00 85 c0 74 2b 8b 82 f8 15 00 00 <83> f8 02 75 20 48 8b 8a 00 16 00 00 8b 92 fc 15 00 00 48 8b 01 48 RSP: 0018:ffffc900040b7798 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff8880238286f8 RCX: ffffffff81ec467c RDX: ffff888050e02440 RSI: ffffffff81ec470d RDI: ffff88802492db98 RBP: ffff88802492db70 R08: 0000000000000007 R09: 0000000000000003 R10: ffff8880238286f9 R11: 0000000000000001 R12: dffffc0000000000 R13: 0000000000000400 R14: ffff8880282f4e38 R15: 000000000011d000 free_vmap_area_rb_augment_cb_compute_max mm/vmalloc.c:985 [inline] free_vmap_area_rb_augment_cb_propagate mm/vmalloc.c:985 [inline] augment_tree_propagate_from mm/vmalloc.c:1314 [inline] va_clip mm/vmalloc.c:1719 [inline] va_alloc mm/vmalloc.c:1747 [inline] __alloc_vmap_area mm/vmalloc.c:1783 [inline] alloc_vmap_area+0x13dd/0x2a70 mm/vmalloc.c:2000 __get_vm_area_node+0x19e/0x2f0 mm/vmalloc.c:3137 __vmalloc_node_range_noprof+0x26a/0x1530 mm/vmalloc.c:3806 __vmalloc_node_noprof mm/vmalloc.c:3911 [inline] vzalloc_noprof+0x6b/0x90 mm/vmalloc.c:3984 alloc_counters net/ipv6/netfilter/ip6_tables.c:815 [inline] copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:837 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1039 [inline] do_ip6t_get_ctl+0x6ba/0xaf0 net/ipv6/netfilter/ip6_tables.c:1677 nf_getsockopt+0x79/0xe0 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x1f7/0x280 net/ipv6/ipv6_sockglue.c:1493 tcp_getsockopt+0x9e/0x100 net/ipv4/tcp.c:4671 do_sock_getsockopt+0x3fe/0x800 net/socket.c:2374 __sys_getsockopt+0x12f/0x260 net/socket.c:2403 __do_sys_getsockopt net/socket.c:2410 [inline] __se_sys_getsockopt net/socket.c:2407 [inline] __x64_sys_getsockopt+0xbd/0x160 net/socket.c:2407 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0b2ed87a6a Code: ff c3 66 0f 1f 44 00 00 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb b8 0f 1f 44 00 00 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 a8 ff ff ff f7 RSP: 002b:00007ffc256f7648 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007ffc256f76d0 RCX: 00007f0b2ed87a6a RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007ffc256f766c R09: 0079746972756365 R10: 00007ffc256f76d0 R11: 0000000000000212 R12: 00007f0b2ef47a00 R13: 00007ffc256f766c R14: 0000000000000000 R15: 00007f0b2ef48e40 Allocated by task 6837: 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:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:901 [inline] p9_client_create+0xc8/0x1200 net/9p/client.c:985 v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc6/0xa30 fs/9p/vfs_super.c:122 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1814 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount fs/namespace.c:4034 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6837: 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:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4613 [inline] kfree+0x14f/0x4b0 mm/slub.c:4761 p9_client_create+0xa58/0x1200 net/9p/client.c:1064 v9fs_session_init+0x1f8/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc6/0xa30 fs/9p/vfs_super.c:122 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1814 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount fs/namespace.c:4034 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88805035b400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of freed 512-byte region [ffff88805035b400, ffff88805035b600) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x50358 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b042c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 00fff00000000040 ffff88801b042c80 0000000000000000 dead000000000001 head: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 00fff00000000002 ffffea000140d601 ffffffffffffffff 0000000000000000 head: 0000000000000004 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 5944, tgid 5944 (syz-executor), ts 45647816099, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3476 __alloc_pages_noprof+0x223/0x25b0 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2269 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2589 [inline] new_slab+0x2c9/0x410 mm/slub.c:2642 ___slab_alloc+0xd7d/0x17a0 mm/slub.c:3830 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] __do_kmalloc_node mm/slub.c:4297 [inline] __kmalloc_noprof+0x2ec/0x510 mm/slub.c:4310 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x337/0x1910 net/ipv6/route.c:3761 addrconf_f6i_alloc+0x393/0x670 net/ipv6/route.c:4588 ipv6_add_addr+0x537/0x2010 net/ipv6/addrconf.c:1120 add_addr+0xe1/0x350 net/ipv6/addrconf.c:3223 add_v4_addrs+0x69e/0x9f0 net/ipv6/addrconf.c:3288 addrconf_sit_config net/ipv6/addrconf.c:3540 [inline] addrconf_init_auto_addrs+0x4df/0x820 net/ipv6/addrconf.c:3577 addrconf_notify+0xe91/0x19c0 net/ipv6/addrconf.c:3764 page_owner free stack trace missing Memory state around the buggy address: ffff88805035b300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805035b380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805035b400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805035b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805035b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 00 48 8b add %cl,-0x75(%rax) 3: 34 24 xor $0x24,%al 5: 74 1d je 0x24 7: f6 c4 01 test $0x1,%ah a: 74 43 je 0x4f c: a9 00 00 0f 00 test $0xf0000,%eax 11: 75 3c jne 0x4f 13: a9 00 00 f0 00 test $0xf00000,%eax 18: 75 35 jne 0x4f 1a: 8b 82 1c 16 00 00 mov 0x161c(%rdx),%eax 20: 85 c0 test %eax,%eax 22: 74 2b je 0x4f 24: 8b 82 f8 15 00 00 mov 0x15f8(%rdx),%eax * 2a: 83 f8 02 cmp $0x2,%eax <-- trapping instruction 2d: 75 20 jne 0x4f 2f: 48 8b 8a 00 16 00 00 mov 0x1600(%rdx),%rcx 36: 8b 92 fc 15 00 00 mov 0x15fc(%rdx),%edx 3c: 48 8b 01 mov (%rcx),%rax 3f: 48 rex.W