syzbot


divide error in do_journal_end

Status: upstream: reported C repro on 2025/09/17 14:39
Reported-by: syzbot+beba04bdaa9f8f6a2eb2@syzkaller.appspotmail.com
First crash: 2d13h, last: 2d11h
Similar bugs (10)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream divide error in do_journal_end fs 2 2 1765d 1792d 0/29 auto-closed as invalid on 2021/03/19 22:00
linux-4.14 divide error in do_journal_end (2) 2 C error 1 1117d 1605d 0/1 upstream: reported C repro on 2021/04/28 16:52
upstream divide error in do_journal_end (3) fs 2 C error done 83 621d 1002d 0/29 auto-obsoleted due to no activity on 2024/04/14 06:39
upstream divide error in do_journal_end (2) erofs 2 C inconclusive 2 1592d 1591d 20/29 fixed on 2021/11/10 00:50
linux-5.15 divide error in do_journal_end missing-backport origin:upstream 2 C done 423 1d15h 804d 0/3 upstream: reported C repro on 2023/07/08 18:42
linux-4.19 divide error in do_journal_end (3) reiserfs 2 C error 1 967d 967d 0/1 upstream: reported C repro on 2023/01/27 02:59
linux-4.19 divide error in do_journal_end (2) 2 C done 4 1531d 1642d 1/1 fixed on 2021/08/12 11:53
linux-6.1 divide error in do_journal_end origin:upstream missing-backport 2 C done 127 4d03h 630d 0/3 upstream: reported C repro on 2023/12/30 01:46
linux-4.14 divide error in do_journal_end 2 C done 1 1715d 1775d 1/1 fixed on 2021/02/21 17:18
linux-4.19 divide error in do_journal_end 2 C done 2 1727d 1787d 1/1 fixed on 2021/01/27 05:38

Sample crash report:
REISERFS warning: reiserfs-5090 is_tree_node: node level 0 does not match to the expected one -1
REISERFS error (device loop0): vs-5150 search_by_key: invalid format found in block 0. Fsck?
REISERFS (device loop0): Remounting filesystem read-only
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5896 Comm: syz-executor Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
RIP: 0010:do_journal_end+0x135f/0x4860 fs/reiserfs/journal.c:4096
Code: 0f b6 04 20 84 c0 0f 85 1f 30 00 00 49 8d 44 1d 01 4c 89 f1 48 c1 e9 03 42 0f b6 0c 21 84 c9 0f 85 26 30 00 00 41 8b 0f 31 d2 <48> f7 f1 49 89 d6 4c 03 74 24 08 48 8b 84 24 d8 00 00 00 42 80 3c
RSP: 0018:ffffc90003367720 EFLAGS: 00010246
RAX: 0000000000000003 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8abcd100 RDI: ffff888075e49ff4
RBP: ffffc90003367990 R08: 424c724573496552 R09: 424c724573496552
R10: dffffc0000000000 R11: ffffed100ebc9400 R12: dffffc0000000000
R13: 0000000000000000 R14: ffff88806d929017 R15: ffff88806d929014
FS:  0000000000000000(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff8bae38d0 CR3: 000000000cb30000 CR4: 00000000003506e0
Call Trace:
 <TASK>
 do_journal_release+0x4ef/0x550 fs/reiserfs/journal.c:1940
 journal_release+0x1f/0x30 fs/reiserfs/journal.c:1971
 reiserfs_put_super+0x222/0x480 fs/reiserfs/super.c:616
 generic_shutdown_super+0x134/0x2b0 fs/super.c:693
 kill_block_super+0x44/0x90 fs/super.c:1660
 deactivate_locked_super+0x97/0x100 fs/super.c:481
 cleanup_mnt+0x429/0x4c0 fs/namespace.c:1250
 task_work_run+0x1ce/0x250 kernel/task_work.c:239
 exit_task_work include/linux/task_work.h:43 [inline]
 do_exit+0x90b/0x23c0 kernel/exit.c:883
 do_group_exit+0x21b/0x2d0 kernel/exit.c:1024
 __do_sys_exit_group kernel/exit.c:1035 [inline]
 __se_sys_exit_group kernel/exit.c:1033 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fab3338eba9
Code: Unable to access opcode bytes at 0x7fab3338eb7f.
RSP: 002b:00007fff8bae59c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007fab33411c77 RCX: 00007fab3338eba9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000010 R08: 00007fff8bae3766 R09: 00007fff8bae6c80
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff8bae6c80
R13: 00007fab33411c05 R14: 0000555556d184a8 R15: 00007fff8bae7d50
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:do_journal_end+0x135f/0x4860 fs/reiserfs/journal.c:4096
Code: 0f b6 04 20 84 c0 0f 85 1f 30 00 00 49 8d 44 1d 01 4c 89 f1 48 c1 e9 03 42 0f b6 0c 21 84 c9 0f 85 26 30 00 00 41 8b 0f 31 d2 <48> f7 f1 49 89 d6 4c 03 74 24 08 48 8b 84 24 d8 00 00 00 42 80 3c
RSP: 0018:ffffc90003367720 EFLAGS: 00010246
RAX: 0000000000000003 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8abcd100 RDI: ffff888075e49ff4
RBP: ffffc90003367990 R08: 424c724573496552 R09: 424c724573496552
R10: dffffc0000000000 R11: ffffed100ebc9400 R12: dffffc0000000000
R13: 0000000000000000 R14: ffff88806d929017 R15: ffff88806d929014
FS:  0000000000000000(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff8bae38d0 CR3: 000000000cb30000 CR4: 00000000003506e0
----------------
Code disassembly (best guess):
   0:	0f b6 04 20          	movzbl (%rax,%riz,1),%eax
   4:	84 c0                	test   %al,%al
   6:	0f 85 1f 30 00 00    	jne    0x302b
   c:	49 8d 44 1d 01       	lea    0x1(%r13,%rbx,1),%rax
  11:	4c 89 f1             	mov    %r14,%rcx
  14:	48 c1 e9 03          	shr    $0x3,%rcx
  18:	42 0f b6 0c 21       	movzbl (%rcx,%r12,1),%ecx
  1d:	84 c9                	test   %cl,%cl
  1f:	0f 85 26 30 00 00    	jne    0x304b
  25:	41 8b 0f             	mov    (%r15),%ecx
  28:	31 d2                	xor    %edx,%edx
* 2a:	48 f7 f1             	div    %rcx <-- trapping instruction
  2d:	49 89 d6             	mov    %rdx,%r14
  30:	4c 03 74 24 08       	add    0x8(%rsp),%r14
  35:	48 8b 84 24 d8 00 00 	mov    0xd8(%rsp),%rax
  3c:	00
  3d:	42                   	rex.X
  3e:	80                   	.byte 0x80
  3f:	3c                   	.byte 0x3c

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/17 16:35 linux-6.6.y 60a9e718726f e2beed91 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan divide error in do_journal_end
2025/09/17 14:46 linux-6.6.y 60a9e718726f e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan divide error in do_journal_end
2025/09/17 14:38 linux-6.6.y 60a9e718726f e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan divide error in do_journal_end
2025/09/17 14:38 linux-6.6.y 60a9e718726f e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan divide error in do_journal_end
* Struck through repros no longer work on HEAD.