syzbot


WARNING in comedi_unlocked_ioctl

Status: fixed on 2025/08/26 15:31
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+b2bde13f12963932c08d@syzkaller.appspotmail.com
Fix commit: d4c73ce13f5b comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large
First crash: 61d, last: 50d
Fix bisection: fixed by (bisect log) :
commit d4c73ce13f5b5a0fe0319f1f352ff602f0ace8e3
Author: Ian Abbott <abbotti@mev.co.uk>
Date: Fri Jul 4 12:04:05 2025 +0000

  comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large

  
Bug presence (1)
Date Name Commit Repro Result
2025/07/12 upstream (ToT) 379f604cc3dc C [report] WARNING in comedi_unlocked_ioctl
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in comedi_unlocked_ioctl mm comedi -1 C 262 51d 68d 29/29 fixed on 2025/09/04 16:57
linux-6.6 WARNING in comedi_unlocked_ioctl origin:upstream -1 C done 9 48d 61d 2/2 fixed on 2025/08/28 16:24
linux-5.15 WARNING in comedi_unlocked_ioctl origin:upstream -1 C 37 13d 62d 0/3 upstream: reported C repro on 2025/07/10 11:52

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 8869 at mm/page_alloc.c:5590 __alloc_pages+0x2f4/0x4e0 mm/page_alloc.c:5590
Modules linked in:
CPU: 0 PID: 8869 Comm: syz.0.1025 Not tainted 6.1.146-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:__alloc_pages+0x2f4/0x4e0 mm/page_alloc.c:5590
Code: 0c 25 28 00 00 00 48 3b 8c 24 a0 00 00 00 0f 85 a0 00 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 c6 05 cb 1f 45 0c 01 <0f> 0b eb a5 a9 00 00 08 00 8b 74 24 04 75 3e 44 89 f1 81 e1 7f ff
RSP: 0018:ffffc90003def9c0 EFLAGS: 00010246
RAX: ffffc90003defa00 RBX: 1ffff920007bdf3c RCX: 0000000000000000
RDX: 0000000000000028 RSI: 0000000000000000 RDI: ffffc90003defa28
RBP: ffffc90003defac0 R08: dffffc0000000000 R09: ffffc90003defa00
R10: fffff520007bdf45 R11: 1ffff920007bdf40 R12: 000000000000001a
R13: 0000000000000000 R14: 0000000000040dc0 R15: dffffc0000000000
FS:  00007fce4ec876c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2e51fffc CR3: 00000000552d7000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __alloc_pages_node include/linux/gfp.h:237 [inline]
 alloc_pages_node include/linux/gfp.h:260 [inline]
 __kmalloc_large_node+0x8c/0x1e0 mm/slab_common.c:1077
 __do_kmalloc_node mm/slab_common.c:924 [inline]
 __kmalloc+0x110/0x240 mm/slab_common.c:949
 kmalloc_array include/linux/slab.h:615 [inline]
 kcalloc include/linux/slab.h:646 [inline]
 comedi_unlocked_ioctl+0x98b/0xe90 drivers/comedi/comedi_fops.c:2237
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fce4dd8e9a9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fce4ec87038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fce4dfb5fa0 RCX: 00007fce4dd8e9a9
RDX: 0000200000000000 RSI: 000000008010640b RDI: 0000000000000003
RBP: 00007fce4de10d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fce4dfb5fa0 R15: 00007ffeec1ad5c8
 </TASK>

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/21 19:41 linux-6.1.y 3369c6df2fae 56d87229 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/21 19:41 linux-6.1.y 3369c6df2fae 56d87229 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/20 17:48 linux-6.1.y 3369c6df2fae 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/18 16:55 linux-6.1.y 3369c6df2fae 88248e14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/18 16:55 linux-6.1.y 3369c6df2fae 88248e14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/12 16:25 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/12 16:25 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/11 10:12 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/11 04:55 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/11 04:55 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in comedi_unlocked_ioctl
2025/07/13 18:13 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in comedi_unlocked_ioctl
2025/07/13 03:00 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in comedi_unlocked_ioctl
2025/07/13 01:39 linux-6.1.y dfc486ec9cce 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in comedi_unlocked_ioctl
* Struck through repros no longer work on HEAD.