Re: [syzbot] [comedi?] KMSAN: kernel-infoleak in do_insnlist_ioctl

From: Hillf Danton
Date: Thu Jul 31 2025 - 05:39:47 EST


> Date: Thu, 31 Jul 2025 00:29:38 -0700 [thread overview]
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: e8d780dcd957 Merge tag 'slab-for-6.17' of git://git.kernel..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=154b8f82580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=30a934bba3cd727
> dashboard link: https://syzkaller.appspot.com/bug?extid=fb4362a104d45ab09cf9
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10a04ca2580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a269bc580000

#syz test

--- x/drivers/comedi/comedi_fops.c
+++ y/drivers/comedi/comedi_fops.c
@@ -1566,7 +1566,7 @@ static int do_insnlist_ioctl(struct come

/* Allocate scratch space for all instruction data. */
data = kmalloc_array(max_n_data_required, sizeof(unsigned int),
- GFP_KERNEL);
+ GFP_KERNEL | __GFP_ZERO);
if (!data) {
ret = -ENOMEM;
goto error;
--