syzbot


divide error in do_journal_end (2)

Status: fixed on 2021/11/10 00:50
Subsystems: reiserfs
[Documentation on labels]
Reported-by: syzbot+0ba9909df31c6a36974d@syzkaller.appspotmail.com
Fix commit: a149127be52f reiserfs: add check for invalid 1st journal block
First crash: 1301d, last: 1301d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: divide error in do_journal_end (log)
Repro: C syz .config
  
Discussions (18)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 5.13 001/189] drm/etnaviv: fix NULL check before some freeing functions is not needed 201 (201) 2021/08/09 16:06
[PATCH 5.12 000/242] 5.12.18-rc1 review 258 (258) 2021/07/22 14:12
[PATCH 4.4 000/188] 4.4.276-rc1 review 195 (195) 2021/07/21 10:42
[PATCH 4.9 000/245] 4.9.276-rc1 review 250 (250) 2021/07/21 10:29
[PATCH 4.14 000/315] 4.14.240-rc1 review 321 (321) 2021/07/20 08:21
[PATCH 4.19 000/421] 4.19.198-rc1 review 423 (423) 2021/07/19 16:00
[PATCH 5.4 000/122] 5.4.133-rc1 review 131 (131) 2021/07/17 01:21
[PATCH 5.10 000/215] 5.10.51-rc1 review 225 (225) 2021/07/17 01:20
[PATCH 5.13 000/266] 5.13.3-rc1 review 276 (276) 2021/07/16 18:08
[PATCH AUTOSEL 4.19 01/55] drm/etnaviv: fix NULL check before some freeing functions is not needed 56 (56) 2021/07/15 08:45
[PATCH AUTOSEL 4.4 01/31] net: pch_gbe: Use proper accessors to BE data in pch_ptp_match() 33 (33) 2021/07/14 16:49
[PATCH AUTOSEL 5.10 001/137] drm/etnaviv: fix NULL check before some freeing functions is not needed 141 (141) 2021/07/12 22:03
[PATCH AUTOSEL 4.9 01/35] net: pch_gbe: Use proper accessors to BE data in pch_ptp_match() 35 (35) 2021/07/06 11:28
[PATCH AUTOSEL 4.14 01/45] drm/etnaviv: fix NULL check before some freeing functions is not needed 45 (45) 2021/07/06 11:27
[PATCH AUTOSEL 5.4 01/74] drm/etnaviv: fix NULL check before some freeing functions is not needed 74 (74) 2021/07/06 11:25
[PATCH AUTOSEL 5.12 001/160] drm/etnaviv: fix NULL check before some freeing functions is not needed 160 (160) 2021/07/06 11:18
[PATCH] reiserfs: add check for invalid 1st journal block 7 (7) 2021/06/08 11:56
[syzbot] divide error in do_journal_end (2) 0 (1) 2021/05/12 09:30
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream divide error in do_journal_end reiserfs 2 1474d 1501d 0/28 auto-closed as invalid on 2021/03/19 22:00
linux-4.14 divide error in do_journal_end (2) C error 1 826d 1314d 0/1 upstream: reported C repro on 2021/04/28 16:52
upstream divide error in do_journal_end (3) reiserfs C error done 83 330d 711d 0/28 auto-obsoleted due to no activity on 2024/04/14 06:39
linux-5.15 divide error in do_journal_end origin:upstream C 275 10d 513d 0/3 upstream: reported C repro on 2023/07/08 18:42
linux-4.19 divide error in do_journal_end (3) reiserfs C error 1 676d 676d 0/1 upstream: reported C repro on 2023/01/27 02:59
linux-4.19 divide error in do_journal_end (2) C done 4 1240d 1351d 1/1 fixed on 2021/08/12 11:53
linux-6.1 divide error in do_journal_end origin:upstream C error 37 40d 339d 0/3 upstream: reported C repro on 2023/12/30 01:46
linux-4.14 divide error in do_journal_end C done 1 1424d 1484d 1/1 fixed on 2021/02/21 17:18
linux-4.19 divide error in do_journal_end C done 2 1436d 1496d 1/1 fixed on 2021/01/27 05:38
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/05/14 20:42 16m paskripkin@gmail.com https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/96/11096/1 OK

Sample crash report:
REISERFS (device loop0): journal params: device loop0, size 8192, journal first block 10, max trans len 1024, max batch 900, max commit age 30, max trans age 30
REISERFS (device loop0): checking transaction log (loop0)
REISERFS (device loop0): Using r5 hash to sort names
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8393 Comm: syz-executor119 Not tainted 5.13.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:do_journal_end+0x24aa/0x4950 fs/reiserfs/journal.c:4188
Code: c1 45 84 ca 0f 85 67 18 00 00 83 e2 07 40 38 d6 41 0f 9e c1 40 84 f6 0f 95 c2 41 84 d1 0f 85 4e 18 00 00 41 8b 7c 24 14 31 d2 <48> f7 f7 49 8d 7d 18 48 8d 34 0a 48 89 f8 48 c1 e8 03 80 3c 18 00
RSP: 0018:ffffc9000187faa0 EFLAGS: 00010246
RAX: 0000000000000005 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900016c1048 R08: 0000000000001000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: ffff8880349b1000
R13: ffff8880285b9000 R14: ffff88801248d4c0 R15: ffff888019b28000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055cf21e91b70 CR3: 0000000013782000 CR4: 0000000000350ef0
Call Trace:
 reiserfs_sync_fs+0xf8/0x120 fs/reiserfs/super.c:78
 __sync_filesystem fs/sync.c:39 [inline]
 sync_filesystem fs/sync.c:67 [inline]
 sync_filesystem+0x1b5/0x260 fs/sync.c:48
 generic_shutdown_super+0x70/0x370 fs/super.c:448
 kill_block_super+0x97/0xf0 fs/super.c:1395
 deactivate_locked_super+0x94/0x160 fs/super.c:335
 deactivate_super+0xad/0xd0 fs/super.c:366
 cleanup_mnt+0x3a2/0x540 fs/namespace.c:1136
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xbfc/0x2a60 kernel/exit.c:826
 do_group_exit+0x125/0x310 kernel/exit.c:923
 __do_sys_exit_group kernel/exit.c:934 [inline]
 __se_sys_exit_group kernel/exit.c:932 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:932
 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4438c9
Code: Unable to access opcode bytes at RIP 0x44389f.
RSP: 002b:00007ffe1e8a33f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00000000004b52f0 RCX: 00000000004438c9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffc4 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004b52f0
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
Modules linked in:
---[ end trace 918df66ba4209fe1 ]---
RIP: 0010:do_journal_end+0x24aa/0x4950 fs/reiserfs/journal.c:4188
Code: c1 45 84 ca 0f 85 67 18 00 00 83 e2 07 40 38 d6 41 0f 9e c1 40 84 f6 0f 95 c2 41 84 d1 0f 85 4e 18 00 00 41 8b 7c 24 14 31 d2 <48> f7 f7 49 8d 7d 18 48 8d 34 0a 48 89 f8 48 c1 e8 03 80 3c 18 00
RSP: 0018:ffffc9000187faa0 EFLAGS: 00010246
RAX: 0000000000000005 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900016c1048 R08: 0000000000001000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: ffff8880349b1000
R13: ffff8880285b9000 R14: ffff88801248d4c0 R15: ffff888019b28000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055cf21e91b70 CR3: 00000000133f2000 CR4: 0000000000350ef0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/11 22:52 upstream 88b06399c9c7 b3c3bb8e .config console log report syz C ci-upstream-kasan-gce-root divide error in do_journal_end
2021/05/11 21:15 upstream 88b06399c9c7 b3c3bb8e .config console log report info ci-upstream-kasan-gce-root divide error in do_journal_end
* Struck through repros no longer work on HEAD.