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 ffff888011f87418 by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 __kasan_check_byte+0x36/0x50 mm/kasan/common.c:580 kasan_check_byte include/linux/kasan.h:401 [inline] lock_acquire kernel/locking/lockdep.c:5842 [inline] lock_acquire+0xfc/0x330 kernel/locking/lockdep.c:5825 __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+0x31e/0x400 drivers/virtio/virtio_ring.c:2718 __handle_irq_event_percpu+0x236/0x890 kernel/irq/handle.c:211 handle_irq_event_percpu kernel/irq/handle.c:248 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:265 handle_edge_irq+0x3ca/0x9e0 kernel/irq/chip.c:855 generic_handle_irq_desc include/linux/irqdesc.h:172 [inline] handle_irq arch/x86/kernel/irq.c:255 [inline] call_irq_handler arch/x86/kernel/irq.c:311 [inline] __common_interrupt+0xd0/0x2f0 arch/x86/kernel/irq.c:326 common_interrupt+0xba/0xe0 arch/x86/kernel/irq.c:319 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688 RIP: 0010:sched_core_balance+0x9d/0xe70 kernel/sched/core.c:6276 Code: a0 95 1c 8e e8 64 07 0e 00 e8 af e3 d0 09 5b 85 c0 0f 85 f3 09 00 00 48 89 ef e8 ee 3c ff ff e8 09 7a 3a 00 fb 48 63 44 24 50 <48> c7 c3 80 5b 89 93 48 89 44 24 08 48 83 f8 07 0f 87 66 0d 00 00 RSP: 0018:ffffffff8de07b68 EFLAGS: 00000202 RAX: 0000000000000000 RBX: ffffffff818ac3bb RCX: ffffffff81c53cff RDX: 0000000000000000 RSI: ffffffff8d89f477 RDI: ffffffff8bd1d1a0 RBP: ffff88802b23ab80 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff9065eed7 R11: 00000000ffffffff R12: ffff88802b23ab80 R13: ffff88801dab8000 R14: 0000000000000000 R15: dffffc0000000000 do_balance_callbacks kernel/sched/core.c:4901 [inline] __balance_callbacks kernel/sched/core.c:4955 [inline] finish_lock_switch kernel/sched/core.c:4994 [inline] finish_task_switch.isra.0+0x458/0xbc0 kernel/sched/core.c:5112 context_switch kernel/sched/core.c:5251 [inline] __schedule+0x1141/0x6150 kernel/sched/core.c:6855 schedule_idle+0x5c/0x90 kernel/sched/core.c:6978 do_idle+0x2b3/0x500 kernel/sched/idle.c:358 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:428 rest_init+0x16b/0x2b0 init/main.c:757 start_kernel+0x3f6/0x4d0 init/main.c:1111 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:310 x86_64_start_kernel+0x130/0x190 arch/x86/kernel/head64.c:291 common_startup_64+0x13e/0x148 Allocated by task 32610: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417 kmalloc_noprof include/linux/slab.h:957 [inline] p9_client_create+0xc7/0x11d0 net/9p/client.c:985 v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc5/0xa90 fs/9p/vfs_super.c:122 legacy_get_tree+0x10c/0x220 fs/fs_context.c:663 vfs_get_tree+0x8e/0x330 fs/super.c:1759 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount fs/namespace.c:3712 [inline] path_mount+0x7bf/0x23a0 fs/namespace.c:4022 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount fs/namespace.c:4201 [inline] __ia32_sys_mount+0x291/0x310 fs/namespace.c:4201 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 32610: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2543 [inline] slab_free mm/slub.c:6642 [inline] kfree+0x29e/0x710 mm/slub.c:6849 p9_client_create+0xa28/0x11d0 net/9p/client.c:1064 v9fs_session_init+0x1f7/0x1a80 fs/9p/v9fs.c:410 v9fs_mount+0xc5/0xa90 fs/9p/vfs_super.c:122 legacy_get_tree+0x10c/0x220 fs/fs_context.c:663 vfs_get_tree+0x8e/0x330 fs/super.c:1759 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount fs/namespace.c:3712 [inline] path_mount+0x7bf/0x23a0 fs/namespace.c:4022 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount fs/namespace.c:4201 [inline] __ia32_sys_mount+0x291/0x310 fs/namespace.c:4201 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888011f87400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of freed 512-byte region [ffff888011f87400, ffff888011f87600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11f84 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 ffff88801b442c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b442c80 0000000000000000 dead000000000001 head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea000047e101 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 25489, tgid 25489 (kworker/u32:45), ts 1834109913571, free_ts 1831012090264 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1845 prep_new_page mm/page_alloc.c:1853 [inline] get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3879 __alloc_frozen_pages_noprof+0x25f/0x2440 mm/page_alloc.c:5178 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3059 [inline] allocate_slab mm/slub.c:3232 [inline] new_slab+0x24a/0x360 mm/slub.c:3286 ___slab_alloc+0xee7/0x1cd0 mm/slub.c:4655 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4778 __slab_alloc_node mm/slub.c:4854 [inline] slab_alloc_node mm/slub.c:5276 [inline] __kmalloc_cache_noprof+0x477/0x770 mm/slub.c:5766 kmalloc_noprof include/linux/slab.h:957 [inline] batadv_forw_packet_alloc+0x3ad/0x4e0 net/batman-adv/send.c:506 batadv_iv_ogm_aggregate_new+0x13c/0x4c0 net/batman-adv/bat_iv_ogm.c:570 batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:677 [inline] batadv_iv_ogm_schedule_buff+0xeb4/0x14c0 net/batman-adv/bat_iv_ogm.c:854 batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:873 [inline] batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:866 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x329/0x920 net/batman-adv/bat_iv_ogm.c:1709 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 page last free pid 19796 tgid 19796 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2901 kasan_depopulate_vmalloc_pte+0x5b/0x80 mm/kasan/shadow.c:495 apply_to_pte_range mm/memory.c:3143 [inline] apply_to_pmd_range mm/memory.c:3187 [inline] apply_to_pud_range mm/memory.c:3223 [inline] apply_to_p4d_range mm/memory.c:3259 [inline] __apply_to_page_range+0x920/0x1260 mm/memory.c:3295 kasan_release_vmalloc+0xd1/0xe0 mm/kasan/shadow.c:616 kasan_release_vmalloc_node mm/vmalloc.c:2255 [inline] purge_vmap_node+0x1ba/0xad0 mm/vmalloc.c:2272 __purge_vmap_area_lazy+0x9d2/0xc00 mm/vmalloc.c:2362 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2396 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff888011f87300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011f87380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011f87400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011f87480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011f87500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: a0 95 1c 8e e8 64 07 movabs 0xe0764e88e1c95,%al 7: 0e 00 9: e8 af e3 d0 09 call 0x9d0e3bd e: 5b pop %rbx f: 85 c0 test %eax,%eax 11: 0f 85 f3 09 00 00 jne 0xa0a 17: 48 89 ef mov %rbp,%rdi 1a: e8 ee 3c ff ff call 0xffff3d0d 1f: e8 09 7a 3a 00 call 0x3a7a2d 24: fb sti 25: 48 63 44 24 50 movslq 0x50(%rsp),%rax * 2a: 48 c7 c3 80 5b 89 93 mov $0xffffffff93895b80,%rbx <-- trapping instruction 31: 48 89 44 24 08 mov %rax,0x8(%rsp) 36: 48 83 f8 07 cmp $0x7,%rax 3a: 0f 87 66 0d 00 00 ja 0xda6