bisecting fixing commit since f1583cb1be35c23df60b1c39e3e7e6704d749d0b building syzkaller on d236a457274375e5273ac4e958722659929c469f testing commit f1583cb1be35c23df60b1c39e3e7e6704d749d0b compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 4a5bfe3b1b6f4260790beec2c26d239a5a6cec507adfee125e69188a3b3f4a07 all runs: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer testing current HEAD 0840a7914caa14315a3191178a9f72c742477860 testing commit 0840a7914caa14315a3191178a9f72c742477860 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: c163283b1459726b97e71bfad0d2633e9dab0c15d3c4e268bfc65db55e69c088 run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: EOF run #1: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer run #2: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer run #3: crashed: INFO: rcu detected stall in corrupted run #4: crashed: INFO: rcu detected stall in corrupted run #5: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer run #6: crashed: INFO: rcu detected stall in corrupted run #7: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer run #8: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer run #9: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer revisions tested: 2, total time: 20m27.789202205s (build: 13m12.099788734s, test: 6m25.124680866s) the crash still happens on HEAD commit msg: Merge tag 'char-misc-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc crash: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer ================================================================== BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2545 [inline] BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0xcaa/0x4430 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2626 Write of size 640 at addr ffffc90006115fe0 by task vivid-000-vid-c/4323 CPU: 1 PID: 4323 Comm: vivid-000-vid-c Not tainted 5.19.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xf/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x39/0x60 mm/kasan/shadow.c:66 tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2545 [inline] tpg_fill_plane_buffer+0xcaa/0x4430 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2626 vivid_fillbuff+0x1821/0x4530 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:470 vivid_thread_vid_cap_tick+0x9d5/0x1e60 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:729 vivid_thread_vid_cap+0x556/0xaa0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:872 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 The buggy address belongs to the virtual mapping at [ffffc90005f54000, ffffc90006117000) created by: vb2_vmalloc_alloc+0x100/0x380 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47 The buggy address belongs to the physical page: page:ffffea0001890200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x62408 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 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 4316, tgid 4315 (syz-executor.3), ts 76067918693, free_ts 76051354816 prep_new_page mm/page_alloc.c:2456 [inline] get_page_from_freelist+0x19d3/0x3b30 mm/page_alloc.c:4198 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5426 vm_area_alloc_pages mm/vmalloc.c:2927 [inline] __vmalloc_area_node mm/vmalloc.c:2995 [inline] __vmalloc_node_range+0x560/0x1010 mm/vmalloc.c:3165 vmalloc_user+0x62/0x80 mm/vmalloc.c:3319 vb2_vmalloc_alloc+0x100/0x380 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47 __vb2_buf_mem_alloc drivers/media/common/videobuf2/videobuf2-core.c:233 [inline] __vb2_queue_alloc+0x4bb/0x1210 drivers/media/common/videobuf2/videobuf2-core.c:444 vb2_core_reqbufs+0x5e8/0xc30 drivers/media/common/videobuf2/videobuf2-core.c:838 __vb2_init_fileio+0x2d5/0xbc0 drivers/media/common/videobuf2/videobuf2-core.c:2636 __vb2_perform_fileio+0xaa9/0x1280 drivers/media/common/videobuf2/videobuf2-core.c:2761 vb2_fop_read+0x1b1/0x390 drivers/media/common/videobuf2/videobuf2-v4l2.c:1175 v4l2_read+0x1e4/0x280 drivers/media/v4l2-core/v4l2-dev.c:314 do_loop_readv_writev fs/read_write.c:763 [inline] do_loop_readv_writev fs/read_write.c:750 [inline] do_iter_read+0x3e7/0x690 fs/read_write.c:805 vfs_readv+0xc3/0x130 fs/read_write.c:923 do_preadv fs/read_write.c:1015 [inline] __do_sys_preadv fs/read_write.c:1065 [inline] __se_sys_preadv fs/read_write.c:1060 [inline] __x64_sys_preadv+0x1d1/0x290 fs/read_write.c:1060 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1371 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1421 free_unref_page_prepare mm/page_alloc.c:3343 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3438 __vunmap+0x66d/0xb40 mm/vmalloc.c:2665 vb2_vmalloc_put drivers/media/common/videobuf2/videobuf2-vmalloc.c:68 [inline] vb2_vmalloc_put+0x4e/0x80 drivers/media/common/videobuf2/videobuf2-vmalloc.c:63 __vb2_buf_mem_free+0xf3/0x200 drivers/media/common/videobuf2/videobuf2-core.c:266 __vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:492 [inline] __vb2_queue_free+0x5be/0x8a0 drivers/media/common/videobuf2/videobuf2-core.c:537 vb2_core_reqbufs+0x1b2/0xc30 drivers/media/common/videobuf2/videobuf2-core.c:796 __vb2_cleanup_fileio+0xdf/0x140 drivers/media/common/videobuf2/videobuf2-core.c:2713 vb2_core_queue_release+0xb/0x70 drivers/media/common/videobuf2/videobuf2-core.c:2430 vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:935 [inline] _vb2_fop_release+0x19b/0x250 drivers/media/common/videobuf2/videobuf2-v4l2.c:1120 v4l2_release+0x217/0x3b0 drivers/media/v4l2-core/v4l2-dev.c:456 __fput+0x1f5/0x8c0 fs/file_table.c:317 task_work_run+0xc0/0x160 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:169 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0x80 arch/x86/entry/common.c:86 Memory state around the buggy address: ffffc90006115f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90006115f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90006116000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90006116080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90006116100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ==================================================================