Hello,
syzbot found the following issue on:
HEAD commit: 02b72ccb5f9d Linux 6.1.138
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=178ff4f4580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=40498c8aeab367b8
dashboard link:
https://syzkaller.appspot.com/bug?extid=17848f25a515137f1596
compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/741917d96f57/disk-02b72ccb.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/b5e0c69249ae/vmlinux-02b72ccb.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/06bfb546fb37/bzImage-02b72ccb.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+17848f...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:-1 [inline]
BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0x1b0a/0x5e00 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705
Write of size 1440 at addr ffffc90003c9fda0 by task vivid-000-vid-c/14707
CPU: 1 PID: 14707 Comm: vivid-000-vid-c Not tainted 6.1.138-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x220 mm/kasan/report.c:427
kasan_report+0x10b/0x140 mm/kasan/report.c:531
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
memcpy+0x3c/0x60 mm/kasan/shadow.c:66
tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:-1 [inline]
tpg_fill_plane_buffer+0x1b0a/0x5e00 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705
vivid_fillbuff drivers/media/test-drivers/vivid/vivid-kthread-cap.c:470 [inline]
vivid_thread_vid_cap_tick+0x1c52/0x67c0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:729
vivid_thread_vid_cap+0x80c/0xe50 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:872
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>
The buggy address belongs to the virtual mapping at
[ffffc90003c89000, ffffc90003ca1000) created by:
vb2_vmalloc_alloc+0xec/0x330 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47
The buggy address belongs to the physical page:
page:ffffea00009af180 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26bc6
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 14704, tgid 14700 (syz.0.3535), ts 400691160620, free_ts 400453998366
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5606
vm_area_alloc_pages mm/vmalloc.c:2994 [inline]
__vmalloc_area_node mm/vmalloc.c:3063 [inline]
__vmalloc_node_range+0x959/0x1390 mm/vmalloc.c:3235
vmalloc_user+0x70/0x80 mm/vmalloc.c:3389
vb2_vmalloc_alloc+0xec/0x330 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47
__vb2_buf_mem_alloc drivers/media/common/videobuf2/videobuf2-core.c:233 [inline]
__vb2_queue_alloc+0x794/0x1410 drivers/media/common/videobuf2/videobuf2-core.c:448
vb2_core_reqbufs+0xa04/0x1110 drivers/media/common/videobuf2/videobuf2-core.c:852
__vb2_init_fileio+0x2c4/0xc90 drivers/media/common/videobuf2/videobuf2-core.c:2680
vb2_core_poll+0x5a9/0x7a0 drivers/media/common/videobuf2/videobuf2-core.c:2509
vb2_poll drivers/media/common/videobuf2/videobuf2-v4l2.c:957 [inline]
vb2_fop_poll+0x164/0x370 drivers/media/common/videobuf2/videobuf2-v4l2.c:1204
v4l2_poll+0x13d/0x2b0 drivers/media/v4l2-core/v4l2-dev.c:348
vfs_poll include/linux/poll.h:92 [inline]
p9_fd_poll net/9p/trans_fd.c:238 [inline]
p9_conn_create+0x40d/0x590 net/9p/trans_fd.c:604
p9_fd_create+0x307/0x3e0 net/9p/trans_fd.c:1103
p9_client_create+0x7a2/0xee0 net/9p/client.c:1008
v9fs_session_init+0x1f2/0x17b0 fs/9p/v9fs.c:408
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 mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525
release_pages+0x1f92/0x2200 mm/swap.c:1035
tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
tlb_flush_mmu+0xff/0x210 mm/mmu_gather.c:261
tlb_finish_mmu+0xbd/0x1c0 mm/mmu_gather.c:361
exit_mmap+0x343/0x8e0 mm/mmap.c:3250
__mmput+0x118/0x3c0 kernel/fork.c:1200
exit_mm+0x1e6/0x2c0 kernel/exit.c:565
do_exit+0x8b9/0x2400 kernel/exit.c:858
do_group_exit+0x217/0x2d0 kernel/exit.c:1021
get_signal+0x1272/0x1350 kernel/signal.c:2871
arch_do_signal_or_restart+0xb0/0x1230 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87
Memory state around the buggy address:
ffffc90003c9ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90003c9ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90003ca0000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
^
ffffc90003ca0080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc90003ca0100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup