wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 ================================================================== BUG: KASAN: slab-use-after-free in drm_atomic_helper_wait_for_vblanks+0x367/0x980 drivers/gpu/drm/drm_atomic_helper.c:1822 Read of size 1 at addr ffff888011cd0c09 by task kworker/u4:5/176 CPU: 0 UID: 0 PID: 176 Comm: kworker/u4:5 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 Workqueue: events_unbound commit_work Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 drm_atomic_helper_wait_for_vblanks+0x367/0x980 drivers/gpu/drm/drm_atomic_helper.c:1822 drm_atomic_helper_commit_tail+0x302/0x520 drivers/gpu/drm/drm_atomic_helper.c:1918 commit_tail+0x29a/0x3a0 drivers/gpu/drm/drm_atomic_helper.c:1995 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5799: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __kmalloc_cache_noprof+0x3d5/0x6f0 mm/slub.c:5755 kmalloc_noprof include/linux/slab.h:957 [inline] drm_atomic_helper_crtc_duplicate_state+0x72/0xb0 drivers/gpu/drm/drm_atomic_state_helper.c:178 drm_atomic_get_crtc_state+0x19a/0x460 drivers/gpu/drm/drm_atomic.c:360 page_flip_common+0x56/0x2a0 drivers/gpu/drm/drm_atomic_helper.c:3839 drm_atomic_helper_page_flip+0xa5/0x160 drivers/gpu/drm/drm_atomic_helper.c:3900 drm_mode_page_flip_ioctl+0xc6d/0x11d0 drivers/gpu/drm/drm_plane.c:1543 drm_ioctl_kernel+0x2cf/0x390 drivers/gpu/drm/drm_ioctl.c:797 drm_ioctl+0x67f/0xb10 drivers/gpu/drm/drm_ioctl.c:894 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5797: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 __kasan_save_free_info+0x46/0x50 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+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2530 [inline] slab_free mm/slub.c:6619 [inline] kfree+0x19a/0x6d0 mm/slub.c:6826 drm_atomic_state_default_clear+0x422/0xbe0 drivers/gpu/drm/drm_atomic.c:224 drm_atomic_state_clear drivers/gpu/drm/drm_atomic.c:293 [inline] __drm_atomic_state_free+0xaf/0x210 drivers/gpu/drm/drm_atomic.c:310 kref_put include/linux/kref.h:65 [inline] drm_atomic_state_put include/drm/drm_atomic.h:588 [inline] drm_client_modeset_commit_atomic+0x6ac/0x760 drivers/gpu/drm/drm_client_modeset.c:1109 drm_client_modeset_commit_locked+0xcb/0x4d0 drivers/gpu/drm/drm_client_modeset.c:1206 drm_client_modeset_commit+0x4a/0x70 drivers/gpu/drm/drm_client_modeset.c:1232 __drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:238 [inline] drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:268 [inline] drm_fb_helper_lastclose+0xa4/0x1c0 drivers/gpu/drm/drm_fb_helper.c:1986 drm_fbdev_client_restore+0x34/0x40 drivers/gpu/drm/clients/drm_fbdev_client.c:31 drm_client_dev_restore+0x13c/0x270 drivers/gpu/drm/drm_client_event.c:117 drm_lastclose drivers/gpu/drm/drm_file.c:408 [inline] drm_release+0x318/0x3f0 drivers/gpu/drm/drm_file.c:441 __fput+0x44c/0xa70 fs/file_table.c:468 task_work_run+0x1d4/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xe9/0x130 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888011cd0c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 9 bytes inside of freed 512-byte region [ffff888011cd0c00, ffff888011cd0e00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11cd0 head: order:1 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 ffff88801a441c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801a441c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000001 ffffea0000473401 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5642, tgid 5642 (syz-executor), ts 135803789246, free_ts 131909731496 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3046 [inline] allocate_slab+0x96/0x3a0 mm/slub.c:3219 new_slab mm/slub.c:3273 [inline] ___slab_alloc+0xe94/0x18a0 mm/slub.c:4643 __slab_alloc+0x65/0x100 mm/slub.c:4762 __slab_alloc_node mm/slub.c:4838 [inline] slab_alloc_node mm/slub.c:5260 [inline] __kmalloc_cache_noprof+0x411/0x6f0 mm/slub.c:5750 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] binderfs_binder_device_create+0x1df/0xb00 drivers/android/binderfs.c:148 binderfs_fill_super+0x9fd/0xec0 drivers/android/binderfs.c:720 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1343 vfs_get_tree+0x92/0x2b0 fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount+0x302/0xa10 fs/namespace.c:3727 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5567 tgid 5567 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] free_unref_folios+0xdb3/0x14f0 mm/page_alloc.c:2963 folios_put_refs+0x584/0x670 mm/swap.c:1002 free_pages_and_swap_cache+0x277/0x520 mm/swap_state.c:355 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:397 [inline] tlb_flush_mmu+0x3a0/0x680 mm/mmu_gather.c:404 tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:497 exit_mmap+0x444/0xb40 mm/mmap.c:1293 __mmput+0x118/0x430 kernel/fork.c:1133 exit_mm+0x1da/0x2c0 kernel/exit.c:582 do_exit+0x648/0x2300 kernel/exit.c:954 do_group_exit+0x21c/0x2d0 kernel/exit.c:1107 get_signal+0x1285/0x1340 kernel/signal.c:3034 arch_do_signal_or_restart+0xa0/0x790 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x72/0x130 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888011cd0b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011cd0b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011cd0c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011cd0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011cd0d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================