From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796212929; b=bE5FbLghpLu/sYmv43lp90tT8jg0Ej7hnf7cb6fAElLTu9aOmAl0+40hBl9QLWeuK5Br C4JwL8Lt66LfhGWTpzMsqb1MhhCQGaooVRSJAKGokFippZsqJNZY1eZnvUCHfP0nWdGfZ Jq5ala10JDZn9Djx03MoUNSZUBBBfF1PvIxCjAWHH9SM9xlQtkJUvMxz/tCVtkFndopFd FxyqJkA07+lkJx1cqvVfqnaIS1Wiucawas2zBNt4syHyV7ZkXg/IcksmAG68k9VrchHQc krgTkE/tICu/gpJuK5KNFTU+d4Z6BEE8+e1AMTqZAn6PABeroB2AG3fg+5knYS6G5ww== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796212929; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:MIME-Version:X-Received:Date:In-Reply-To: X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID: Subject:From:To:Content-Type; bh=5ykNddFLMjWOTfqJO8nVUs/I0DBVv7G84AbWxN9nyIU=; b=ybXOqt+zvBV3+BYW8M4n6pvEU/F1t7ym+AhgeHwyeyaZb02ZXS9LgbygY1NA1NqQ5/oD p0O8H+3cvEYyyMiOQBAcnTk8Fd1/24NpD5pxKhbZny6/cKsuFA6JSPhjQQXKtAxeZyFWl g8G3ZNlT28WXDztu2QoI/PbI2h9LW4lrCW6CPTxgx2paS/BJ+RXJZElL90AYM3g4mc003 a5RC94rvb1cusXPSzoyHV+yUR7lXW2HRMW5A1NvSQNOiK9xRPzaiiQ8fqc1KKnuFozIU4 kC/XRbB1PHHC/pAQlOuAmwq04S74LpM71K5Fm6xnEFqsPfjlGX+pUgROuA0Votc3ebA== 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.197 Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (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 72E29606A33A for ; Wed, 2 Dec 2026 12:02:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 72E29606A33A 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-f197.google.com with SMTP id 5614622812f47-4c467e19391so18177998b6e.3 for ; Wed, 02 Dec 2026 04:02:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796212928; x=1796817728; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=5ykNddFLMjWOTfqJO8nVUs/I0DBVv7G84AbWxN9nyIU=; b=LU+jZ3tjHf7fe4bapryFx4OqCxcJimM2l1llpSO+Ol52pNmR3f1OZt+ZMQMie/THVe ZhWyIDxNN23w2QByk8pH49yYqBJ/Mgq9WxBb09qnXCTv5VPAGeEdLdKOSx/oqS4Dr0Lz lnjAZSjDsb/VdHfgqmNvNFlMnFaiQt9fnY3c+Sqi7sutlK1AN8Cmo/5bRhVoUxWDQ3OM YoMUZ1dT7ZtK9BdNu4LjV0sTpF9KK6Vs62xpHVK7sRTwFQ7KTwSQaGQBKnjLWOYLe9oT gfzggaVXQmWi0qDd6BUL5CZ3T8MGMeqDOpGcTgPpOsMNQnHipmsT2NwbPQbwQp9gOdQl Lm5g== X-Forwarded-Encrypted: i=1; AL+hErGyhxL3cGQkGh6jyAAur9f3FGhlmTH53oebOA2RpAsI5vqdGWkoY0/1mjn/6ghWCaeYaBCLiByKpGCHvg==@vger.kernel.org X-Gm-Message-State: APuU4Z8ZcuamJB8Xbt8MloFNKh1+UavXUg2PaPw7DmFCOGX72a2QTPeQ cMXBdDlDOEKv2ik0T4bTO+07c8aAgzEhgX0k4rn6HtMvR8wwNjq4f3Za1EfY/VI3X6ZMbgxwm6y Shfi7kdlUZesUZuQUhoQGcWBKdDrhRQ7iUTHAUAXI71eK0DIr6DO+oilJVmk= 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:6808:4fe3:b0:4b9:e6ab:d07a with SMTP id 5614622812f47-57a0a503358mr42785208b6e.26.1796212928535; Wed, 02 Dec 2026 04:02:08 -0800 (PST) Date: Wed, 02 Dec 2026 04:02:08 -0800 In-Reply-To: <6b088253.28411dd9.2968b4.0009.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b1008c0.449a30c8.3a672f.00f3.GAE@google.com> Subject: Re: [syzbot] [media?] general protection fault in __media_device_register From: syzbot To: hverkuil@kernel.org, laurent.pinchart@ideasonboard.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@osg.samsung.com, sakari.ailus@linux.intel.com, syzkaller-bugs@googlegroups.com, wangjichen@kaihong.com Content-Type: text/plain; charset="UTF-8" syzbot has found a reproducer for the following issue on: HEAD commit: 693c2e04e3f1 mm: kvmalloc: Bail if called with soft or har.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=159dd903580000 kernel config: https://syzkaller.appspot.com/x/.config?x=8979a1c07b42ca5b dashboard link: https://syzkaller.appspot.com/bug?extid=8769efb8c3d52870334c compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=139dd903580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=101e88cd580000 Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/98fce4d0b21b/non_bootable_disk-693c2e04.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/023ae32ca246/vmlinux-693c2e04.xz kernel image: https://storage.googleapis.com/syzbot-assets/8a559f2e0c51/bzImage-693c2e04.xz The issue was bisected by AI to: commit 37ecc7b1278f4184a6869504f7074b4a54f112c5 Author: Mauro Carvalho Chehab Date: Wed Jan 27 09:07:24 2016 +0000 [media] em28xx: add media controller support reasoning: https://syzkaller.appspot.com/ai_job?id=cc710625-e1fd-46cf-b43b-f649c55c924b AI-generated root cause summary: In drivers/media/usb/em28xx/em28xx-cards.c, em28xx_init_dev() calls em28xx_media_device_init() without checking its return value. When the kzalloc_obj(*mdev) allocation in em28xx_media_device_init() fails and returns -ENOMEM, dev->media_dev remains NULL while device initialization continues. Later in em28xx_usb_probe(), media_device_register(dev->media_dev) is called unconditionally with dev->media_dev == NULL, triggering a NULL-pointer dereference in __media_device_register() at mdev->devnode = devnode. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=8769efb8c3d52870334c IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+8769efb8c3d52870334c@syzkaller.appspotmail.com The bisection result may be wrong. If you agree with it, please also add: Fixes: 37ecc7b1278f ("[media] em28xx: add media controller support") R13: 0000000000000000 R14: 00007f78f6e35fa0 R15: 00007f78f6e35fa0 em28xx 5-1:0.0: Config register raw data: 0xfffffffb em28xx 5-1:0.0: AC97 chip type couldn't be determined em28xx 5-1:0.0: No AC97 audio processor Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 UID: 0 PID: 5833 Comm: syz.3.31 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:__media_device_register+0x6e/0x3c0 drivers/media/mc/mc-device.c:745 Code: 30 89 6e 06 ba 60 05 00 00 be c0 0d 00 00 e8 b9 5f 0d fa 48 85 c0 0f 84 7a 01 00 00 49 89 c6 4d 8d 6f 08 4d 89 ec 49 c1 ec 03 <41> 80 3c 1c 00 74 08 4c 89 ef e8 a3 61 19 fa 4c 89 2c 24 4d 89 75 RSP: 0018:ffffc9000d1f77c0 EFLAGS: 00010202 RAX: ffff8880142f5000 RBX: dffffc0000000000 RCX: 90435aea4802f800 RDX: 00000000000016c9 RSI: ffffffff8e6b0246 RDI: 00000000ffffffff RBP: 0000000000000000 R08: ffffffff91be6dbf R09: 1ffffffff237cdb7 R10: dffffc0000000000 R11: fffffbfff237cdb8 R12: 0000000000000001 R13: 0000000000000008 R14: ffff8880142f5000 R15: 0000000000000000 FS: 0000555578874500(0000) GS:ffff88808a9e5000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2e577dbd50 CR3: 0000000043067000 CR4: 0000000000352ef0 Call Trace: em28xx_usb_probe+0x1c5e/0x2dd0 drivers/media/usb/em28xx/em28xx-cards.c:4444 usb_probe_interface+0x751/0xe00 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x254/0xae0 drivers/base/dd.c:707 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:869 driver_probe_device+0x4f/0x240 drivers/base/dd.c:899 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1027 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500 __device_attach+0x2bd/0x430 drivers/base/dd.c:1131 proc_ioctl+0x409/0x660 drivers/usb/core/devio.c:2370 proc_ioctl_default+0xc4/0x110 drivers/usb/core/devio.c:2405 usbdev_do_ioctl drivers/usb/core/devio.c:2769 [inline] usbdev_ioctl+0x139d/0x21a0 drivers/usb/core/devio.c:2829 vfs_ioctl fs/ioctl.c:52 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f78f6ba9c99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd452e6878 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f78f6e35fa0 RCX: 00007f78f6ba9c99 RDX: 0000200000000340 RSI: 00000000c0105512 RDI: 0000000000000004 RBP: 00007ffd452e68e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000000000000000 R14: 00007f78f6e35fa0 R15: 00007f78f6e35fa0 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__media_device_register+0x6e/0x3c0 drivers/media/mc/mc-device.c:745 Code: 30 89 6e 06 ba 60 05 00 00 be c0 0d 00 00 e8 b9 5f 0d fa 48 85 c0 0f 84 7a 01 00 00 49 89 c6 4d 8d 6f 08 4d 89 ec 49 c1 ec 03 <41> 80 3c 1c 00 74 08 4c 89 ef e8 a3 61 19 fa 4c 89 2c 24 4d 89 75 RSP: 0018:ffffc9000d1f77c0 EFLAGS: 00010202 RAX: ffff8880142f5000 RBX: dffffc0000000000 RCX: 90435aea4802f800 RDX: 00000000000016c9 RSI: ffffffff8e6b0246 RDI: 00000000ffffffff RBP: 0000000000000000 R08: ffffffff91be6dbf R09: 1ffffffff237cdb7 R10: dffffc0000000000 R11: fffffbfff237cdb8 R12: 0000000000000001 R13: 0000000000000008 R14: ffff8880142f5000 R15: 0000000000000000 FS: 0000555578874500(0000) GS:ffff88808a9e5000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2e577dbd50 CR3: 0000000043067000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess): 0: 30 89 6e 06 ba 60 xor %cl,0x60ba066e(%rcx) 6: 05 00 00 be c0 add $0xc0be0000,%eax b: 0d 00 00 e8 b9 or $0xb9e80000,%eax 10: 5f pop %rdi 11: 0d fa 48 85 c0 or $0xc08548fa,%eax 16: 0f 84 7a 01 00 00 je 0x196 1c: 49 89 c6 mov %rax,%r14 1f: 4d 8d 6f 08 lea 0x8(%r15),%r13 23: 4d 89 ec mov %r13,%r12 26: 49 c1 ec 03 shr $0x3,%r12 * 2a: 41 80 3c 1c 00 cmpb $0x0,(%r12,%rbx,1) <-- trapping instruction 2f: 74 08 je 0x39 31: 4c 89 ef mov %r13,%rdi 34: e8 a3 61 19 fa call 0xfa1961dc 39: 4c 89 2c 24 mov %r13,(%rsp) 3d: 4d rex.WRB 3e: 89 .byte 0x89 3f: 75 .byte 0x75