syzbot


divide error in dbNextAG

Status: fixed on 2023/02/24 13:50
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+46f5c25af73eb8330eb6@syzkaller.appspotmail.com
Fix commit: 2cc7cc01c15f jfs: fix divide error in dbNextAG
First crash: 773d, last: 773d
Cause bisection: failed (error log, bisect log)
  
Discussions (10)
Title Replies (including bot) Last reply
[PATCH 4.19 000/338] 4.19.238-rc1 review 357 (358) 2022/12/17 09:01
[PATCH 4.14 000/284] 4.14.276-rc1 review 297 (298) 2022/09/12 10:15
[PATCH 5.10 000/599] 5.10.110-rc1 review 628 (629) 2022/05/08 12:31
[PATCH 4.9 000/218] 4.9.311-rc1 review 224 (225) 2022/04/19 10:09
[PATCH 5.4 000/475] 5.4.189-rc1 review 485 (486) 2022/04/15 15:35
[PATCH 5.16 0000/1017] 5.16.19-rc1 review 1034 (1035) 2022/04/07 08:34
[PATCH 5.15 000/913] 5.15.33-rc1 review 932 (933) 2022/04/06 15:36
[PATCH 5.17 0000/1126] 5.17.2-rc1 review 1143 (1144) 2022/04/06 14:06
[PATCH] jfs: fix divide error in dbNextAG 3 (3) 2022/03/22 15:25
[syzbot] divide error in dbNextAG 1 (3) 2022/03/19 18:32
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 divide error in dbNextAG 1 976d 976d 0/1 auto-closed as invalid on 2021/12/22 21:17
linux-4.19 divide error in dbNextAG (2) jfs C error 10 477d 771d 0/1 upstream: reported C repro on 2022/03/17 14:18
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/03/19 18:23 8m paskripkin@gmail.com patch upstream OK

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3622 Comm: syz-executor.0 Not tainted 5.17.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:dbNextAG+0xfc/0x5f0 fs/jfs/jfs_dmap.c:602
Code: 48 89 c1 48 89 44 24 08 83 e0 07 48 c1 e9 03 0f b6 0c 11 48 89 c2 83 c2 03 38 ca 7c 08 84 c9 0f 85 ca 03 00 00 44 89 f8 31 d2 <41> f7 75 14 49 89 c7 49 8d 45 20 48 89 c2 48 89 44 24 20 48 b8 00
RSP: 0018:ffffc900028d7a40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88801d782800 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88801f5c3008
RBP: ffff88801d782800 R08: 0000000000000000 R09: ffffc900028d797f
R10: fffff5200051af2f R11: 0000000000000000 R12: ffff88806dede530
R13: ffff88801f5c3000 R14: ffff88806dedf598 R15: 0000000000000000
FS:  00007f05def99700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f05def99718 CR3: 000000001ef61000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 diAlloc+0xa96/0x1730 fs/jfs/jfs_imap.c:1342
 ialloc+0x89/0xaa0 fs/jfs/jfs_inode.c:56
 jfs_mkdir+0x1f0/0xab0 fs/jfs/namei.c:225
 vfs_mkdir+0x1c3/0x3b0 fs/namei.c:3933
 do_mkdirat+0x285/0x300 fs/namei.c:3959
 __do_sys_mkdirat fs/namei.c:3974 [inline]
 __se_sys_mkdirat fs/namei.c:3972 [inline]
 __x64_sys_mkdirat+0x115/0x170 fs/namei.c:3972
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f05df845049
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f05def99168 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f05df958030 RCX: 00007f05df845049
RDX: 0000000000000020 RSI: 0000000020000300 RDI: 0000000000000005
RBP: 00007f05df89f08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc16fbfa9f R14: 00007f05def99300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:dbNextAG+0xfc/0x5f0 fs/jfs/jfs_dmap.c:602
Code: 48 89 c1 48 89 44 24 08 83 e0 07 48 c1 e9 03 0f b6 0c 11 48 89 c2 83 c2 03 38 ca 7c 08 84 c9 0f 85 ca 03 00 00 44 89 f8 31 d2 <41> f7 75 14 49 89 c7 49 8d 45 20 48 89 c2 48 89 44 24 20 48 b8 00
RSP: 0018:ffffc900028d7a40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88801d782800 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88801f5c3008
RBP: ffff88801d782800 R08: 0000000000000000 R09: ffffc900028d797f
R10: fffff5200051af2f R11: 0000000000000000 R12: ffff88806dede530
R13: ffff88801f5c3000 R14: ffff88806dedf598 R15: 0000000000000000
FS:  00007f05def99700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcf01138f8 CR3: 000000001ef61000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 89 c1             	mov    %rax,%rcx
   3:	48 89 44 24 08       	mov    %rax,0x8(%rsp)
   8:	83 e0 07             	and    $0x7,%eax
   b:	48 c1 e9 03          	shr    $0x3,%rcx
   f:	0f b6 0c 11          	movzbl (%rcx,%rdx,1),%ecx
  13:	48 89 c2             	mov    %rax,%rdx
  16:	83 c2 03             	add    $0x3,%edx
  19:	38 ca                	cmp    %cl,%dl
  1b:	7c 08                	jl     0x25
  1d:	84 c9                	test   %cl,%cl
  1f:	0f 85 ca 03 00 00    	jne    0x3ef
  25:	44 89 f8             	mov    %r15d,%eax
  28:	31 d2                	xor    %edx,%edx
* 2a:	41 f7 75 14          	divl   0x14(%r13) <-- trapping instruction
  2e:	49 89 c7             	mov    %rax,%r15
  31:	49 8d 45 20          	lea    0x20(%r13),%rax
  35:	48 89 c2             	mov    %rax,%rdx
  38:	48 89 44 24 20       	mov    %rax,0x20(%rsp)
  3d:	48                   	rex.W
  3e:	b8                   	.byte 0xb8

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/15 18:45 upstream 09688c0166e7 9e8eaa75 .config console log report syz ci-upstream-kasan-gce-selinux-root divide error in dbNextAG
2022/03/15 17:59 upstream 09688c0166e7 9e8eaa75 .config console log report info ci-upstream-kasan-gce-selinux-root divide error in dbNextAG
* Struck through repros no longer work on HEAD.