================================================================== BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0x1ad1/0x5af0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2702 Write of size 1280 at addr ffffc90003383b40 by task vivid-000-vid-c/18277 CPU: 1 UID: 0 PID: 18277 Comm: vivid-000-vid-c Not tainted 6.11.0-rc6-syzkaller-00355-g5dadc1be8fc5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 tpg_fill_plane_buffer+0x1ad1/0x5af0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2702 vivid_fillbuff drivers/media/test-drivers/vivid/vivid-kthread-cap.c:470 [inline] vivid_thread_vid_cap_tick+0xf8e/0x60d0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:629 vivid_thread_vid_cap+0x8aa/0xf30 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:767 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the virtual mapping at [ffffc90003381000, ffffc90003385000) created by: vb2_vmalloc_alloc+0xf2/0x340 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805b923d20 pfn:0x5b923 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88805b923d20 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 18275, tgid 18273 (syz.1.2239), ts 1048774727471, free_ts 1048774331874 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 vm_area_alloc_pages mm/vmalloc.c:3587 [inline] __vmalloc_area_node mm/vmalloc.c:3656 [inline] __vmalloc_node_range_noprof+0xa40/0x1400 mm/vmalloc.c:3837 vmalloc_user_noprof+0x74/0x80 mm/vmalloc.c:3991 vb2_vmalloc_alloc+0xf2/0x340 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47 __vb2_buf_mem_alloc drivers/media/common/videobuf2/videobuf2-core.c:242 [inline] __vb2_queue_alloc+0xa0f/0x16f0 drivers/media/common/videobuf2/videobuf2-core.c:509 vb2_core_reqbufs+0xd2e/0x17c0 drivers/media/common/videobuf2/videobuf2-core.c:950 __vb2_init_fileio+0x319/0xf90 drivers/media/common/videobuf2/videobuf2-core.c:2854 vb2_core_poll+0x46c/0x7b0 drivers/media/common/videobuf2/videobuf2-core.c:2688 vb2_poll drivers/media/common/videobuf2/videobuf2-v4l2.c:980 [inline] vb2_fop_poll+0x170/0x360 drivers/media/common/videobuf2/videobuf2-v4l2.c:1245 v4l2_poll+0x143/0x2c0 drivers/media/v4l2-core/v4l2-dev.c:348 vfs_poll include/linux/poll.h:84 [inline] do_pollfd fs/select.c:873 [inline] do_poll fs/select.c:921 [inline] do_sys_poll+0x7ce/0x1300 fs/select.c:1016 __do_sys_ppoll fs/select.c:1122 [inline] __se_sys_ppoll+0x2a0/0x330 fs/select.c:1102 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 page last free pid 18275 tgid 18273 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2619 discard_slab mm/slub.c:2587 [inline] __put_partials+0xeb/0x130 mm/slub.c:3055 put_cpu_partial+0x17c/0x250 mm/slub.c:3130 __slab_free+0x2ea/0x3d0 mm/slub.c:4347 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3992 [inline] slab_alloc_node mm/slub.c:4041 [inline] __do_kmalloc_node mm/slub.c:4161 [inline] __kmalloc_node_noprof+0x1d2/0x440 mm/slub.c:4168 kmalloc_node_noprof include/linux/slab.h:708 [inline] __vmalloc_area_node mm/vmalloc.c:3642 [inline] __vmalloc_node_range_noprof+0x5e3/0x1400 mm/vmalloc.c:3837 vmalloc_user_noprof+0x74/0x80 mm/vmalloc.c:3991 vb2_vmalloc_alloc+0xf2/0x340 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47 __vb2_buf_mem_alloc drivers/media/common/videobuf2/videobuf2-core.c:242 [inline] __vb2_queue_alloc+0xa0f/0x16f0 drivers/media/common/videobuf2/videobuf2-core.c:509 vb2_core_reqbufs+0xd2e/0x17c0 drivers/media/common/videobuf2/videobuf2-core.c:950 __vb2_init_fileio+0x319/0xf90 drivers/media/common/videobuf2/videobuf2-core.c:2854 vb2_core_poll+0x46c/0x7b0 drivers/media/common/videobuf2/videobuf2-core.c:2688 vb2_poll drivers/media/common/videobuf2/videobuf2-v4l2.c:980 [inline] vb2_fop_poll+0x170/0x360 drivers/media/common/videobuf2/videobuf2-v4l2.c:1245 Memory state around the buggy address: ffffc90003383f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90003383f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003384000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90003384080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90003384100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ==================================================================