From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.198 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796032492; b=sQ9CZDE/ly1XJZnY57apiEERtR43gUI81pgvbIwqLtDcPtFAfx/9fROii9rMFVYj4w/u 7QdDJ7LuxqO0kLDkD/fpV1lmpU858hxV95Vt7EAKdiog/zLangIAq5oVSMPdH6qelt/Xj 2nvobUoJzOHRe/fDoenXO3zjtS+4L3dVVuvjYwtOVvC4fGhjRUCk4Aj5cO1MxdUh1bkxF qdCVY031rVCP2CHOWC7neFnNgzPIcpm0c4MnyCeaUNsQQeIssmNUxOY3/k5LS5BwxFRC0 b/h+6aosZNDRN08Jd8ghMQ3j3aorHgfF8/TJFRquGvFeQS5BNjdYi1CzG7MtT4KPyuA== 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=AN1j0l4d8Pmwk8zQugOeHIfF7JSzi22RyeRetm/XT41QRYIfK85Hnnvr/jofQb6n6TF6 8uItAN0bkp/1ZVBicLyqWoQ6aVW/y+btYO6XQhZNPZsx3lGpP9EScTpILGVl13BLuoVTo kQNUhp7km/yw7mYRuUFm9NMEJk+DCx4CVYOkqYyjMeuPUG9HgQFtvsb6hrTtVMdi092Qn JQAXemZoiMYxJtXOXHKCdA7sqtkz2XV8OVjJM2Yv313vWftaWLyd8jiYKXJW9qr9sd38U K3R40PUD9fZcCyJEjd/HT0Dvz9Zog33mti9R21CTGCgAmyOuRwqbF0ntrxtjiuWs7kA== 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.167.198 Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) (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 5C524606A33C for ; Mon, 30 Nov 2026 09:54:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5C524606A33C 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-oi1-f198.google.com with SMTP id 5614622812f47-4cbf700ddccso7401420b6e.0 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=P6DsFFU+53Ycpg9Nm03dydsCyjWuVHC0l/11t+kCoIOoDttHQsFnlxg5TVMRknQerY 0wUS3M59vUAuApnoOW4v8ogZl/ocjy9kVwWsvfNlpn+3KB29cIGXyefnLWSD6Deuovm7 5z/U9Nf8hksXxEWCUk4NgZ2Fr9D2jE5CxZj9BqovkN7FRmkPiv46I2XhIsEMrBXQhx4B isAazIXTfya6+Wke2Le0oU3/tsFOPI8C+mQkui16GSvV8gJjvthnRDt0c4HwlcqMofTH rZJEBjGUYiD3rvT1kjKa/qmhSbotqlv2wANnWKIIYGw4vZeh8cmmuI81yNaHBBI+HAWC Yngg== X-Forwarded-Encrypted: i=1; AL+hErGiAR/vgqssKUGjF15+OmzSr4IzlDPH8Q8qWbsw6P+jMIfGFwU7A5bJ8c4y8DNUdJvlsCHCyP2orVc8jg==@vger.kernel.org X-Gm-Message-State: APuU4Z/P3QTaS0NPp0fTdYLc/HlGRJmmHoyaZq5zXOE0I4mEkUillDw3 L/vwb5JfRK4QRXV1FOOeMBBAS/TFOnXqPQyHseAiOE7qQgRmr51zQIasVMtTPGxNSIC++CTiJaV 9rFS4XB9n2WDbXgxrJYH1pKEJsHP7lkYUV9cYwZYKjfBOL0Gzi0YQZd8HGx4= X-Mailing-List: linux-media@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