vkms_vblank_simulate: vblank timer overrun ================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 Read of size 1 at addr ffff88802b130418 by task syz.0.34/6146 CPU: 3 UID: 0 PID: 6146 Comm: syz.0.34 Not tainted 6.15.0-rc1-syzkaller-00065-g3b07108ada81 #0 PREEMPT(full) 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:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 __kasan_check_byte+0x36/0x50 mm/kasan/common.c:557 kasan_check_byte include/linux/kasan.h:399 [inline] lock_acquire kernel/locking/lockdep.c:5840 [inline] lock_acquire+0xfc/0x350 kernel/locking/lockdep.c:5823 __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+0x1dc/0x2e0 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:254 [inline] call_irq_handler arch/x86/kernel/irq.c:266 [inline] __common_interrupt+0xdf/0x250 arch/x86/kernel/irq.c:292 common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:285 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:memory_is_nonzero mm/kasan/generic.c:103 [inline] RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:129 [inline] RIP: 0010:memory_is_poisoned mm/kasan/generic.c:161 [inline] RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline] RIP: 0010:kasan_check_range+0x64/0x1a0 mm/kasan/generic.c:189 Code: 89 fd 48 b8 00 00 00 00 00 fc ff df 4d 89 d1 48 c1 ed 03 49 c1 e9 03 48 01 c5 49 01 c1 48 89 e8 49 8d 59 01 48 89 da 48 29 ea <48> 83 fa 10 0f 8e 8d 00 00 00 41 89 eb 41 83 e3 07 0f 85 9a 00 00 RSP: 0018:ffffc900032af0e8 EFLAGS: 00000202 RAX: fffff940002a9790 RBX: fffff940002a9791 RCX: ffffffff81fd17bc RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffea000154bc80 RBP: fffff940002a9790 R08: 0000000000000000 R09: fffff940002a9790 R10: ffffea000154bc87 R11: 0000000000000000 R12: 0000000000001000 R13: ffff888036318808 R14: 0000000000001000 R15: ffff888036318858 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] folio_test_uptodate include/linux/page-flags.h:801 [inline] shmem_write_end+0xcc/0x4d0 mm/shmem.c:3313 generic_perform_write+0x26e/0x930 mm/filemap.c:4123 shmem_file_write_iter+0x10e/0x140 mm/shmem.c:3464 __kernel_write_iter+0x317/0xa90 fs/read_write.c:617 dump_emit_page fs/coredump.c:885 [inline] dump_user_range+0x418/0xb30 fs/coredump.c:959 elf_core_dump+0x288a/0x3a90 fs/binfmt_elf.c:2128 do_coredump+0x3183/0x4480 fs/coredump.c:759 get_signal+0x22e3/0x26d0 kernel/signal.c:3019 arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] irqentry_exit_to_user_mode+0x13f/0x280 kernel/entry/common.c:231 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617 RIP: 00fb:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 002b:0000000000000000 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6181: 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:905 [inline] p9_client_create+0xc7/0x11c0 net/9p/client.c:985 v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc5/0xa30 fs/9p/vfs_super.c:122 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8b/0x340 fs/super.c:1759 do_new_mount fs/namespace.c:3879 [inline] path_mount+0x14d4/0x1f30 fs/namespace.c:4206 do_mount fs/namespace.c:4219 [inline] __do_sys_mount fs/namespace.c:4430 [inline] __se_sys_mount fs/namespace.c:4407 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4407 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6181: 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:576 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:2389 [inline] slab_free mm/slub.c:4646 [inline] kfree+0x2b6/0x4d0 mm/slub.c:4845 p9_client_create+0xa28/0x11c0 net/9p/client.c:1064 v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc5/0xa30 fs/9p/vfs_super.c:122 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8b/0x340 fs/super.c:1759 do_new_mount fs/namespace.c:3879 [inline] path_mount+0x14d4/0x1f30 fs/namespace.c:4206 do_mount fs/namespace.c:4219 [inline] __do_sys_mount fs/namespace.c:4430 [inline] __se_sys_mount fs/namespace.c:4407 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4407 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802b130400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of freed 512-byte region [ffff88802b130400, ffff88802b130600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b130 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b442c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b442c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000ac4c01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 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 5939, tgid 5939 (syz-executor), ts 70007830198, free_ts 69837464301 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1717 prep_new_page mm/page_alloc.c:1725 [inline] get_page_from_freelist+0x1193/0x39b0 mm/page_alloc.c:3652 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4934 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2459 [inline] allocate_slab mm/slub.c:2623 [inline] new_slab+0x23c/0x330 mm/slub.c:2676 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3862 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3952 __slab_alloc_node mm/slub.c:4027 [inline] slab_alloc_node mm/slub.c:4188 [inline] __do_kmalloc_node mm/slub.c:4330 [inline] __kmalloc_noprof+0x2f2/0x510 mm/slub.c:4343 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x33f/0x18e0 net/ipv6/route.c:3801 addrconf_f6i_alloc+0x391/0x670 net/ipv6/route.c:4630 ipv6_add_addr+0x531/0x1fe0 net/ipv6/addrconf.c:1121 inet6_addr_add+0x256/0x960 net/ipv6/addrconf.c:3049 inet6_rtm_newaddr+0x1619/0x1c70 net/ipv6/addrconf.c:5059 rtnetlink_rcv_msg+0x95b/0xe90 net/core/rtnetlink.c:6955 netlink_rcv_skb+0x16a/0x440 net/netlink/af_netlink.c:2534 page last free pid 58 tgid 58 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2680 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4151 [inline] slab_alloc_node mm/slub.c:4200 [inline] kmem_cache_alloc_node_noprof+0x1d5/0x3b0 mm/slub.c:4252 __alloc_skb+0x2b2/0x380 net/core/skbuff.c:658 alloc_skb include/linux/skbuff.h:1340 [inline] mld_newpack.isra.0+0x18e/0xa20 net/ipv6/mcast.c:1788 add_grhead+0x299/0x340 net/ipv6/mcast.c:1899 add_grec+0x112a/0x1680 net/ipv6/mcast.c:2037 mld_send_cr net/ipv6/mcast.c:2163 [inline] mld_ifc_work+0x41f/0xca0 net/ipv6/mcast.c:2702 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88802b130300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802b130380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802b130400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802b130480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802b130500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 89 fd mov %edi,%ebp 2: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 9: fc ff df c: 4d 89 d1 mov %r10,%r9 f: 48 c1 ed 03 shr $0x3,%rbp 13: 49 c1 e9 03 shr $0x3,%r9 17: 48 01 c5 add %rax,%rbp 1a: 49 01 c1 add %rax,%r9 1d: 48 89 e8 mov %rbp,%rax 20: 49 8d 59 01 lea 0x1(%r9),%rbx 24: 48 89 da mov %rbx,%rdx 27: 48 29 ea sub %rbp,%rdx * 2a: 48 83 fa 10 cmp $0x10,%rdx <-- trapping instruction 2e: 0f 8e 8d 00 00 00 jle 0xc1 34: 41 89 eb mov %ebp,%r11d 37: 41 83 e3 07 and $0x7,%r11d 3b: 0f .byte 0xf 3c: 85 .byte 0x85 3d: 9a (bad)