syzbot


divide error in comedi_inc_scan_progress

Status: upstream: reported on 2025/07/22 05:26
Reported-by: syzbot+4158da92d6b01e6e7f64@syzkaller.appspotmail.com
First crash: 41d, last: 38d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream divide error in comedi_inc_scan_progress comedi 2 27 27d 54d 0/29 upstream: reported on 2025/07/08 17:52

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 18928 Comm: syz.3.3656 Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:comedi_inc_scan_progress+0x1a2/0x430 drivers/comedi/drivers.c:555
Code: b6 0c 19 84 c9 0f 85 b8 01 00 00 03 45 34 4c 8d a5 88 00 00 00 4c 89 e1 48 c1 e9 03 0f b6 0c 19 84 c9 0f 85 c7 01 00 00 31 d2 <41> f7 34 24 41 89 17 45 89 ec eb 0f e8 9d e7 8b f9 48 bb 00 00 00
RSP: 0018:ffffc90000007c88 EFLAGS: 00010046
RAX: 0000000000000001 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff888021278e00 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffff5200165a201 R12: ffff888021278e88
R13: 0000000000000002 R14: 0000000000000000 R15: ffff888021278e34
FS:  00007f8a9aeb96c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000000002c0 CR3: 000000004a3e3000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 000000000000000c DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 comedi_buf_write_samples+0x372/0x5d0 drivers/comedi/comedi_buf.c:646
 parport_interrupt+0xf4/0x150 drivers/comedi/drivers/comedi_parport.c:218
 __handle_irq_event_percpu+0x276/0x930 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
 handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:210
 handle_edge_irq+0x247/0xb30 kernel/irq/chip.c:831
 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline]
 handle_irq arch/x86/kernel/irq.c:240 [inline]
 __common_interrupt+0x13b/0x230 arch/x86/kernel/irq.c:259
 common_interrupt+0xb4/0xd0 arch/x86/kernel/irq.c:249
 </IRQ>
 <TASK>
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:678
RIP: 0010:on_stack arch/x86/include/asm/stacktrace.h:58 [inline]
RIP: 0010:stack_access_ok arch/x86/kernel/unwind_orc.c:393 [inline]
RIP: 0010:deref_stack_reg arch/x86/kernel/unwind_orc.c:403 [inline]
RIP: 0010:unwind_next_frame+0xeec/0x2970 arch/x86/kernel/unwind_orc.c:585
Code: 00 4c 89 74 24 58 48 8b 44 24 08 4c 8d 70 f8 48 8b 2c 24 4c 8b 7d 10 48 b8 00 00 00 00 00 fc ff df 48 8b 4c 24 18 0f b6 04 01 <84> c0 0f 85 a7 15 00 00 8b 6d 00 31 ff 89 ee e8 70 e7 4a 00 85 ed
RSP: 0018:ffffc900044fe5b0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffc900044f8000 RCX: 1ffff9200089fcdd
RDX: ffffffff813ab106 RSI: ffffffff8cb9e570 RDI: 0000000000000002
RBP: ffffc900044fe6e8 R08: ffff888027f95a00 R09: 0000000000000003
R10: 0000000000000004 R11: 0000000000000000 R12: 1ffff9200089fcde
R13: 1ffff9200089fcdf R14: ffffc900044fe6e0 R15: ffffc90004500000
 __unwind_start+0x66a/0x7e0 arch/x86/kernel/unwind_orc.c:760
 unwind_start arch/x86/include/asm/unwind.h:64 [inline]
 arch_stack_walk+0xf8/0x190 arch/x86/kernel/stacktrace.c:24
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
 save_stack+0xf7/0x1f0 mm/page_owner.c:128
 __set_page_owner+0x1d/0x60 mm/page_owner.c:192
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
 prep_new_page mm/page_alloc.c:1561 [inline]
 get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
 __folio_alloc+0x10/0x20 mm/page_alloc.c:4489
 vma_alloc_folio+0x47a/0x8f0 mm/mempolicy.c:2242
 shmem_alloc_folio+0x179/0x230 mm/shmem.c:1680
 shmem_alloc_and_acct_folio+0x189/0x630 mm/shmem.c:1705
 shmem_get_folio_gfp+0xcde/0x2ac0 mm/shmem.c:2042
 shmem_get_folio mm/shmem.c:2165 [inline]
 shmem_write_begin+0xf2/0x420 mm/shmem.c:2707
 generic_perform_write+0x2fb/0x5b0 mm/filemap.c:4016
 shmem_file_write_iter+0xfb/0x120 mm/shmem.c:2884
 __kernel_write_iter+0x274/0x670 fs/read_write.c:517
 dump_emit_page fs/coredump.c:957 [inline]
 dump_user_range+0x3f6/0x800 fs/coredump.c:984
 elf_core_dump+0x3114/0x36e0 fs/binfmt_elf.c:2184
 do_coredump+0x1755/0x2480 fs/coredump.c:833
 get_signal+0x1133/0x1400 kernel/signal.c:2888
 arch_do_signal_or_restart+0x96/0x780 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 irqentry_exit_to_user_mode+0x9/0x40 kernel/entry/common.c:315
 exc_page_fault+0x8f/0x110 arch/x86/mm/fault.c:1524
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608
RIP: 0033:0x7f8a99f8e9b1
Code: 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 83 c8 ff c3 66 2e 0f 1f
RSP: 002b:00000000fffffe10 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007f8a9a1b5fa0 RCX: 00007f8a99f8e9a9
RDX: 0000000000000000 RSI: 00000000fffffe10 RDI: 0000000000000000
RBP: 00007f8a9a010d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f8a9a1b5fa0 R15: 00007ffe722c52a8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:comedi_inc_scan_progress+0x1a2/0x430 drivers/comedi/drivers.c:555
Code: b6 0c 19 84 c9 0f 85 b8 01 00 00 03 45 34 4c 8d a5 88 00 00 00 4c 89 e1 48 c1 e9 03 0f b6 0c 19 84 c9 0f 85 c7 01 00 00 31 d2 <41> f7 34 24 41 89 17 45 89 ec eb 0f e8 9d e7 8b f9 48 bb 00 00 00
RSP: 0018:ffffc90000007c88 EFLAGS: 00010046
RAX: 0000000000000001 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff888021278e00 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffff5200165a201 R12: ffff888021278e88
R13: 0000000000000002 R14: 0000000000000000 R15: ffff888021278e34
FS:  00007f8a9aeb96c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000000002c0 CR3: 000000004a3e3000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 000000000000000c DR6: 00000000ffff0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	b6 0c                	mov    $0xc,%dh
   2:	19 84 c9 0f 85 b8 01 	sbb    %eax,0x1b8850f(%rcx,%rcx,8)
   9:	00 00                	add    %al,(%rax)
   b:	03 45 34             	add    0x34(%rbp),%eax
   e:	4c 8d a5 88 00 00 00 	lea    0x88(%rbp),%r12
  15:	4c 89 e1             	mov    %r12,%rcx
  18:	48 c1 e9 03          	shr    $0x3,%rcx
  1c:	0f b6 0c 19          	movzbl (%rcx,%rbx,1),%ecx
  20:	84 c9                	test   %cl,%cl
  22:	0f 85 c7 01 00 00    	jne    0x1ef
  28:	31 d2                	xor    %edx,%edx
* 2a:	41 f7 34 24          	divl   (%r12) <-- trapping instruction
  2e:	41 89 17             	mov    %edx,(%r15)
  31:	45 89 ec             	mov    %r13d,%r12d
  34:	eb 0f                	jmp    0x45
  36:	e8 9d e7 8b f9       	call   0xf98be7d8
  3b:	48                   	rex.W
  3c:	bb                   	.byte 0xbb
  3d:	00 00                	add    %al,(%rax)

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/24 16:45 linux-6.6.y dbcb8d8e4163 65d60d73 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan divide error in comedi_inc_scan_progress
2025/07/22 05:26 linux-6.6.y d96eb99e2f0e 1555463b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan divide error in comedi_inc_scan_progress
* Struck through repros no longer work on HEAD.