* [syzbot] [media?] KMSAN: uninit-value in dvbdmx_release_ts_feed @ 2026-02-08 1:15 syzbot 2026-02-08 9:35 ` [PATCH] media: dvb-core: pesfilter shouldn't be set when feed is uninitialized Edward Adam Davis 0 siblings, 1 reply; 2+ messages in thread From: syzbot @ 2026-02-08 1:15 UTC (permalink / raw) To: linux-kernel, linux-media, mchehab, syzkaller-bugs Hello, syzbot found the following issue on: HEAD commit: 2687c848e578 x86/vmware: Fix hypercall clobbers git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=16bd1402580000 kernel config: https://syzkaller.appspot.com/x/.config?x=9682a42d8ec8b05c dashboard link: https://syzkaller.appspot.com/bug?extid=01d4620886bee3db0e74 compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1154ab22580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1566fa5a580000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/915713ca8484/disk-2687c848.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/9b87f40abe9d/vmlinux-2687c848.xz kernel image: https://storage.googleapis.com/syzbot-assets/d4744727b418/bzImage-2687c848.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+01d4620886bee3db0e74@syzkaller.appspotmail.com dvb_demux: dvb_demux_feed_del: feed not in list (type=0 state=0 pid=ffff) ===================================================== BUG: KMSAN: uninit-value in dvbdmx_release_ts_feed+0x198/0x290 drivers/media/dvb-core/dvb_demux.c:858 dvbdmx_release_ts_feed+0x198/0x290 drivers/media/dvb-core/dvb_demux.c:858 dvb_dmxdev_start_feed drivers/media/dvb-core/dmxdev.c:-1 [inline] dvb_dmxdev_filter_start+0x1187/0x1af0 drivers/media/dvb-core/dmxdev.c:766 dvb_dmxdev_pes_filter_set+0x810/0x860 drivers/media/dvb-core/dmxdev.c:963 dvb_demux_do_ioctl+0x9a3/0xc80 drivers/media/dvb-core/dmxdev.c:1077 dvb_usercopy+0x263/0x500 drivers/media/dvb-core/dvbdev.c:999 dvb_demux_ioctl+0x46/0x70 drivers/media/dvb-core/dmxdev.c:1186 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0x23c/0x400 fs/ioctl.c:583 __x64_sys_ioctl+0x97/0xe0 fs/ioctl.c:583 x64_sys_call+0x18a7/0x3e70 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Uninit was created at: __alloc_frozen_pages_noprof+0x6df/0xf50 mm/page_alloc.c:5263 alloc_pages_mpol+0x328/0x860 mm/mempolicy.c:2486 alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline] alloc_pages_noprof+0x101/0x280 mm/mempolicy.c:2577 vm_area_alloc_pages mm/vmalloc.c:3649 [inline] __vmalloc_area_node mm/vmalloc.c:3863 [inline] __vmalloc_node_range_noprof+0xa97/0x2d80 mm/vmalloc.c:4051 __vmalloc_node_noprof mm/vmalloc.c:4111 [inline] __vmalloc_noprof+0x128/0x1f0 mm/vmalloc.c:4127 __vmalloc_array_noprof mm/util.c:633 [inline] vmalloc_array_noprof+0x48/0x80 mm/util.c:644 dvb_dmx_init+0x121/0x930 drivers/media/dvb-core/dvb_demux.c:1253 vidtv_bridge_dmx_init drivers/media/test-drivers/vidtv/vidtv_bridge.c:334 [inline] vidtv_bridge_dvb_init drivers/media/test-drivers/vidtv/vidtv_bridge.c:441 [inline] vidtv_bridge_probe+0x1b1f/0x2690 drivers/media/test-drivers/vidtv/vidtv_bridge.c:508 platform_probe+0x213/0x370 drivers/base/platform.c:1446 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x4d5/0xe40 drivers/base/dd.c:661 __driver_probe_device+0x25e/0x370 drivers/base/dd.c:803 driver_probe_device+0x70/0x8f0 drivers/base/dd.c:833 __driver_attach+0x53e/0xaa0 drivers/base/dd.c:1227 bus_for_each_dev+0x33b/0x580 drivers/base/bus.c:383 driver_attach+0x51/0x70 drivers/base/dd.c:1245 bus_add_driver+0x54f/0xdb0 drivers/base/bus.c:715 driver_register+0x42e/0x6a0 drivers/base/driver.c:249 __platform_driver_register+0x65/0x80 drivers/base/platform.c:908 vidtv_bridge_init+0x73/0x100 drivers/media/test-drivers/vidtv/vidtv_bridge.c:598 do_one_initcall+0x22b/0xad0 init/main.c:1378 do_initcall_level+0x157/0x2e0 init/main.c:1440 do_initcalls+0x176/0x310 init/main.c:1456 do_basic_setup+0x1d/0x30 init/main.c:1475 kernel_init_freeable+0x213/0x430 init/main.c:1688 kernel_init+0x2f/0x5e0 init/main.c:1578 ret_from_fork+0x207/0x6f0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 CPU: 0 UID: 0 PID: 6181 Comm: syz.1.40 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026 ===================================================== --- 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. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] media: dvb-core: pesfilter shouldn't be set when feed is uninitialized 2026-02-08 1:15 [syzbot] [media?] KMSAN: uninit-value in dvbdmx_release_ts_feed syzbot @ 2026-02-08 9:35 ` Edward Adam Davis 0 siblings, 0 replies; 2+ messages in thread From: Edward Adam Davis @ 2026-02-08 9:35 UTC (permalink / raw) To: syzbot+01d4620886bee3db0e74 Cc: linux-kernel, linux-media, mchehab, syzkaller-bugs syzbot reported a uninit-value bug in [1]. When dmx_ts_feed_set() fails, the feed is not properly initialized. This includes the feed not being added to the demux's feed_list and ts_type, pes_type, etc., not being set. Under these circumstances, it is illogical to determine whether to set the pesfilter in dvbdmx_release_ts_feed() based on the uninitialized members ts_type and pes_type of the feed. Since dvb_demux_feed_del() checks whether the feed has been successfully added to the demux's feed_list, it can be confirmed that the feed has been correctly initialized when it is added to the demux's feed_list. A return value is added to dvb_demux_feed_del(). When the feed is not added to the feed_list, it is considered that the feed has not yet been initialized, and when releasing the feed, it will no longer determine whether to update the pesfilter based on its members. [1] BUG: KMSAN: uninit-value in dvbdmx_release_ts_feed+0x198/0x290 drivers/media/dvb-core/dvb_demux.c:858 dvbdmx_release_ts_feed+0x198/0x290 drivers/media/dvb-core/dvb_demux.c:858 dvb_dmxdev_start_feed drivers/media/dvb-core/dmxdev.c:-1 [inline] dvb_dmxdev_filter_start+0x1187/0x1af0 drivers/media/dvb-core/dmxdev.c:766 Uninit was created at: dvb_dmx_init+0x121/0x930 drivers/media/dvb-core/dvb_demux.c:1253 vidtv_bridge_dmx_init drivers/media/test-drivers/vidtv/vidtv_bridge.c:334 [inline] Reported-by: syzbot+01d4620886bee3db0e74@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=01d4620886bee3db0e74 Tested-by: syzbot+01d4620886bee3db0e74@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis <eadavis@qq.com> --- drivers/media/dvb-core/dvb_demux.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-core/dvb_demux.c b/drivers/media/dvb-core/dvb_demux.c index 290fc7961647..669ce8b95ad5 100644 --- a/drivers/media/dvb-core/dvb_demux.c +++ b/drivers/media/dvb-core/dvb_demux.c @@ -670,18 +670,22 @@ static void dvb_demux_feed_add(struct dvb_demux_feed *feed) spin_unlock_irq(&feed->demux->lock); } -static void dvb_demux_feed_del(struct dvb_demux_feed *feed) +static int dvb_demux_feed_del(struct dvb_demux_feed *feed) { + int ret; spin_lock_irq(&feed->demux->lock); if (!(dvb_demux_feed_find(feed))) { pr_err("%s: feed not in list (type=%x state=%x pid=%x)\n", __func__, feed->type, feed->state, feed->pid); + ret = -EINVAL; goto out; } list_del(&feed->list_head); + ret = 0; out: spin_unlock_irq(&feed->demux->lock); + return ret; } static int dmx_ts_feed_set(struct dmx_ts_feed *ts_feed, u16 pid, int ts_type, @@ -840,6 +844,7 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx, { struct dvb_demux *demux = (struct dvb_demux *)dmx; struct dvb_demux_feed *feed = (struct dvb_demux_feed *)ts_feed; + int ret; mutex_lock(&demux->mutex); @@ -851,11 +856,12 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx, feed->state = DMX_STATE_FREE; feed->filter->state = DMX_STATE_FREE; - dvb_demux_feed_del(feed); + ret = dvb_demux_feed_del(feed); feed->pid = 0xffff; - if (feed->ts_type & TS_DECODER && feed->pes_type < DMX_PES_OTHER) + if (!ret && feed->ts_type & TS_DECODER && + feed->pes_type < DMX_PES_OTHER) demux->pesfilter[feed->pes_type] = NULL; mutex_unlock(&demux->mutex); -- 2.43.0 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-08 9:35 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-02-08 1:15 [syzbot] [media?] KMSAN: uninit-value in dvbdmx_release_ts_feed syzbot 2026-02-08 9:35 ` [PATCH] media: dvb-core: pesfilter shouldn't be set when feed is uninitialized Edward Adam Davis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox