ci starts bisection 2022-11-21 00:59:55.314578746 +0000 UTC m=+211831.384695163 bisecting fixing commit since f1583cb1be35c23df60b1c39e3e7e6704d749d0b building syzkaller on d236a457274375e5273ac4e958722659929c469f ensuring issue is reproducible on original commit f1583cb1be35c23df60b1c39e3e7e6704d749d0b testing commit f1583cb1be35c23df60b1c39e3e7e6704d749d0b gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6993423e1ee8ac70b0db652da2b8f196ac26a6bc39f8277d76bd42f9711a6877 all runs: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer testing current HEAD eb7081409f94a9a8608593d0fb63a1aa3d6f95d8 testing commit eb7081409f94a9a8608593d0fb63a1aa3d6f95d8 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: e3cfaba1c30b5c864f31b9739dc01c04c54ea22ab93d10bf0c53fd846288239f all runs: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer revisions tested: 2, total time: 22m33.860726958s (build: 14m32.732633883s, test: 6m52.763401319s) the crash still happens on HEAD commit msg: Linux 6.1-rc6 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:2589 [inline] BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0xca3/0x4a40 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2670 Write of size 640 at addr ffffc9000d62dfe0 by task vivid-000-vid-c/4351 CPU: 1 PID: 4351 Comm: vivid-000-vid-c Not tainted 6.1.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 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:2589 [inline] tpg_fill_plane_buffer+0xca3/0x4a40 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2670 vivid_fillbuff+0x1840/0x43f0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:470 vivid_thread_vid_cap_tick+0x9d4/0x1e70 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:729 vivid_thread_vid_cap+0x58e/0xbc0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:872 kthread+0x294/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the virtual mapping at [ffffc9000d46c000, ffffc9000d62f000) created by: vb2_vmalloc_alloc+0x100/0x380 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47 The buggy address belongs to the physical page: page:ffffea0001f13b80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c4ee 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 4349, tgid 4347 (syz-executor.1), ts 103381943097, free_ts 103239370595 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4288 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5555 vm_area_alloc_pages mm/vmalloc.c:2975 [inline] __vmalloc_area_node mm/vmalloc.c:3043 [inline] __vmalloc_node_range+0x6f7/0xff0 mm/vmalloc.c:3213 vmalloc_user+0x62/0x80 mm/vmalloc.c:3367 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:1174 v4l2_read+0x1e4/0x280 drivers/media/v4l2-core/v4l2-dev.c:314 do_loop_readv_writev fs/read_write.c:756 [inline] do_loop_readv_writev fs/read_write.c:743 [inline] do_iter_read+0x3e7/0x690 fs/read_write.c:798 vfs_readv+0xc3/0x130 fs/read_write.c:916 do_preadv fs/read_write.c:1008 [inline] __do_sys_preadv fs/read_write.c:1058 [inline] __se_sys_preadv fs/read_write.c:1053 [inline] __x64_sys_preadv+0x1d1/0x290 fs/read_write.c:1053 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+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3483 __vunmap+0x66e/0xb40 mm/vmalloc.c:2713 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:934 [inline] _vb2_fop_release+0x19b/0x250 drivers/media/common/videobuf2/videobuf2-v4l2.c:1119 v4l2_release+0x217/0x3b0 drivers/media/v4l2-core/v4l2-dev.c:456 __fput+0x1fa/0x9a0 fs/file_table.c:320 task_work_run+0x12b/0x220 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 do_syscall_64+0x42/0x80 arch/x86/entry/common.c:86 Memory state around the buggy address: ffffc9000d62df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000d62df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000d62e000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc9000d62e080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc9000d62e100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ==================================================================