From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796032492; b=U8HPjwr/33NKG9gh2XM9rWmZuaPLqUmAuyD3q5qZupRBBFbPSjPKWd4WtRqhsXbFpWHu ZZOgltDYFKnb8LYEwalPgoIBR3vW/qYEEQh5rhGoq1KtS8DMrnQYmcUBMtkmkqRr1vx5C ZzJRnGNogiIYzu1UR8rqFtvp2GUG8jiC0VdJkAxwjc43E3s9pzq4ShClu5RHRg3dsLueH 8U9S/y/prY68KH9x+L+mo3BO4mUZaJNyod6IIZiqy5Pxa9dGULp9cLp4a8QkjcTpgP+pT npvuxHWWableogtk5bLRrTxRTBa4Vp7AfOhHNBxLzONdFgxJH6JTM75p0n7YHJ8SvWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796032492; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:MIME-Version:X-Received:Date: X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID: Subject:From:To:Content-Type; bh=570oUnG8B1ByDZy/dovB+3DTyB8l6XgtwcOcRavowUs=; b=k4iaIQbEpz6oxFASycB8HkNGw5CHTsCpssBWt2F7S3hOVSWctEiDD4WY4JFYVo0GuMOr MSLqJfJOQFfvj5fT9RADz3RuVhEW68ze6OWKRBy0rMfy//2+zCY6EL7ByQ2C4JrsVYGrX EtC1UuqrbwwiHzsXKNt5eDbl9yzcaEQyFlv8cI7WnBrmaYl9b8bcFyvymHGifG21s1qB1 ucmIhbt2+BUdMDJSHasGZb5122VHxhUNUP9PPZYv80H/EiNHbjM5/ITQ0jwnI0XnMe0rf TP5XKcoqSfabaFKcXlkEiecpH0p1+654ArAsIXa+AZyKmnKqpEuG6Ye7rbwalgzBsHQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.remote-ip=209.85.210.69 Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56A69606A33B for ; Mon, 30 Nov 2026 09:54:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 56A69606A33B Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-851f720d7afso5354247a34.3 for ; Mon, 30 Nov 2026 01:54:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796032491; x=1796637291; h=content-type:to:from:subject:message-id:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=570oUnG8B1ByDZy/dovB+3DTyB8l6XgtwcOcRavowUs=; b=P2SUqCwAYNR4+RvF9alXkPH5dYGactw9Qx5JNOpuQxiBkXRrEHdvNHp1sd9Ld4bWSV vGIpGca8pV2k1o3+jdV/Cvf2SW63ony0Dgb5o3H+Z1yr2/BhpiMHYFkXHD2qsRqVnJHj dp9Xd2MNqqTIJO/IDlhSwbfqhFcWQKFqCA2urQh3Emu62JcbgRzlLzM6Q0O7Fdc25JUZ CAZ1cyiLgZqN9dcPpWuxjt4GteK8CEOchSOSulnIhOMph56baybaoOdGWvrP2qHmSn5a AfFwfOwjyyT79T4/r5y0Q7ilhYdqNqV+acndiVAqHdS8Kb3XXdDNPBrAW0GDXoFd7eIx pfzg== X-Forwarded-Encrypted: i=1; AL+hErFhFDUA4Zvz/R8B4DUYoY3vlcYK4RzxybwUi04f9Swv/q45AxJVXrHssvNL/F58j3de2+SdQVq0PNfw9Gc=@vger.kernel.org X-Gm-Message-State: APuU4Z9kTi+mdJ7BBMmQirJ2H1X7+uD4fYSGbmL30sVIxpfXEj3N9YEi 7789vXzNeXlZlIN+pqLjH/i+e51s0TpjJ/CCpLNbAgXAtDJPAgV7vrLzcLrBeIZnnNswssw/DgN H4n4QgYLV5kRenNypqPQG3AClSciKVJLmxKO7mjtba9b1i3UA7N1aP6EEGgs= X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Received: by 2002:a05:6809:347:10b0:57e:c958:59a0 with SMTP id 5614622812f47-57ec9585a3fmr1315744b6e.46.1796032491400; Mon, 30 Nov 2026 01:54:51 -0800 (PST) Date: Mon, 30 Nov 2026 01:54:51 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b0d47eb.218a765f.b2f5d.0216.GAE@google.com> Subject: [syzbot] [media?] KASAN: vmalloc-out-of-bounds Write in tpg_fill_plane_extras From: syzbot To: arnd@arndb.de, hans.verkuil@cisco.com, hverkuil+cisco@kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@osg.samsung.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: fe6ff8d5d675 Linux 7.4-rc5 git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git console output: https://syzkaller.appspot.com/x/log.txt?x=15e3c3bd580000 kernel config: https://syzkaller.appspot.com/x/.config?x=d07b2352498f5906 dashboard link: https://syzkaller.appspot.com/bug?extid=09b54b89ef0ae7af3c2b compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8 userspace arch: i386 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=155d6ce9580000 The issue was bisected by AI to: commit 9991deff1ac9361abbe0c5938b27f903f16d1ca0 Author: Hans Verkuil Date: Sun Mar 8 08:53:10 2015 +0000 [media] vivid-tpg: add helper functions to simplify common calculations reasoning: https://syzkaller.appspot.com/ai_job?id=67113508-6669-42b6-891d-a89e28beedfb AI-generated root cause summary: In `tpg_fill_plane_extras()` (`drivers/media/common/v4l2-tpg/v4l2-tpg-core.c`), when `tpg->insert_eav` is enabled, the function unconditionally writes a 4-byte EAV sequence (`p[0..3]`) at `vbuf + tpg_hdiv(tpg, p, tpg->compose.width * 2 / 3)` without verifying that `offset + 4 <= params->img_width`. For planar YUV formats with horizontal subsampling (`hdownsampling[p] == 2`, `twopixelsize[p] == 2`, such as `YUV420` or `YUV422P` chroma planes) and a small `compose.width` allowed by `vivid` (`16` or `18`, where `MIN_WIDTH == 16`), `params->img_width` is 8 or 9 bytes while `offset` is 5 or 6 bytes, causing `p[3]` at line 2441 to write 1 byte past `params->img_width`. When the compose rectangle reaches the bottom-right edge of the buffer on the final plane, `vbuf + params->img_width` coincides with the end of the `vmalloc_user()` buffer, producing a 1-byte vmalloc out-of-bounds write. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=09b54b89ef0ae7af3c2b IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+09b54b89ef0ae7af3c2b@syzkaller.appspotmail.com The bisection result may be wrong. If you agree with it, please also add: Fixes: 9991deff1ac9 ("[media] vivid-tpg: add helper functions to simplify common calculations") ================================================================== BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_extras+0x1883/0x2580 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2441 Write of size 1 at addr ffffc9000374b000 by task vivid-000-vid-c/5961 CPU: 1 UID: 0 PID: 5961 Comm: vivid-000-vid-c Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 tpg_fill_plane_extras+0x1883/0x2580 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2441 tpg_fill_plane_buffer+0x1230/0x22b0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2709 vivid_fillbuff drivers/media/test-drivers/vivid/vivid-kthread-cap.c:470 [inline] vivid_thread_vid_cap_tick+0x115c/0x6340 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:629 vivid_thread_vid_cap+0x922/0x11d0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:767 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to a 18-page vmalloc region starting at 0xffffc90003739000 allocated at vb2_vmalloc_alloc+0xef/0x360 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47 Memory state around the buggy address: ffffc9000374af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000374af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000374b000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc9000374b080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc9000374b100: 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 syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection 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