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: b5d030fad2b29b4cea2b7dfdb28a2032f387540eab76a89a135b4e04cc8968fe
all runs: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer
testing current HEAD 143a6252e1b8ab424b4b293512a97cca7295c182
testing commit 143a6252e1b8ab424b4b293512a97cca7295c182
compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: 37696461cdd66fb1636f92e21bebbf985c3b7399bede34c3444f1a112a36d301
run #0: crashed: INFO: rcu detected stall in corrupted
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: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer
run #4: crashed: INFO: rcu detected stall in corrupted
run #5: crashed: INFO: rcu detected stall in corrupted
run #6: crashed: KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_buffer
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: 20m18.815545s (build: 13m0.437933874s, test: 6m26.27366274s)
the crash still happens on HEAD
commit msg: Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
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 128 at addr ffffc9000c0dbfe0 by task vivid-000-vid-c/4336
CPU: 1 PID: 4336 Comm: vivid-000-vid-c Not tainted 5.18.0-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
[ffffc9000bf1a000, ffffc9000c0dd000) created by:
vb2_vmalloc_alloc+0x100/0x380 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47
------------[ cut here ]------------
kernel BUG at mm/vmalloc.c:660!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4336 Comm: vivid-000-vid-c Not tainted 5.18.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:vmalloc_to_page+0x311/0x390 mm/vmalloc.c:660
Code: 83 e0 01 48 f7 d8 48 31 c8 48 21 f0 48 c1 e8 0c 48 01 d8 48 c1 e0 06 48 89 c3 48 b8 00 00 00 00 00 ea ff ff 48 01 d8 5b 5d c3 <0f> 0b 0f 0b 31 c0 e9 5a ff ff ff 0f 0b 31 c0 e9 51 ff ff ff 0f 0b
RSP: 0018:ffffc900033bf810 EFLAGS: 00010012
RAX: 0000370000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00001ffffffffffe RSI: 0000000000000004 RDI: 0000000000000000
RBP: ffffffff8ac8e000 R08: 0000000000000000 R09: ffff8880b9f279ab
R10: ffffed10173e4f35 R11: 0000000033333454 R12: ffffc9000c0dbfe0
R13: 0000000000000000 R14: ffff8880189aba00 R15: 0000000000000286
FS: 0000000000000000(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffabd9af718 CR3: 00000000662a8000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
print_address_description.constprop.0.cold+0x2fc/0x495 mm/kasan/report.c:350
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
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:vmalloc_to_page+0x311/0x390 mm/vmalloc.c:660
Code: 83 e0 01 48 f7 d8 48 31 c8 48 21 f0 48 c1 e8 0c 48 01 d8 48 c1 e0 06 48 89 c3 48 b8 00 00 00 00 00 ea ff ff 48 01 d8 5b 5d c3 <0f> 0b 0f 0b 31 c0 e9 5a ff ff ff 0f 0b 31 c0 e9 51 ff ff ff 0f 0b
RSP: 0018:ffffc900033bf810 EFLAGS: 00010012
RAX: 0000370000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00001ffffffffffe RSI: 0000000000000004 RDI: 0000000000000000
RBP: ffffffff8ac8e000 R08: 0000000000000000 R09: ffff8880b9f279ab
R10: ffffed10173e4f35 R11: 0000000033333454 R12: ffffc9000c0dbfe0
R13: 0000000000000000 R14: ffff8880189aba00 R15: 0000000000000286
FS: 0000000000000000(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffabd9af718 CR3: 00000000662a8000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400