syzbot


kernel BUG in notify_change

Status: fixed on 2023/08/02 14:36
Reported-by: syzbot+fcb6592762d7a9ae57f0@syzkaller.appspotmail.com
Fix commit: f8c9fae0076e ANDROID: incfs: Add check for ATTR_KILL_SUID and ATTR_MODE in incfs_setattr
First crash: 722d, last: 690d
Cause bisection: the cause commit could be any of (bisect log):
  58bf0c328828 f2fs: fix to use WHINT_MODE
  9fc4794bc551 f2fs: fix up f2fs_lookup tracepoints
  b4c06c0fba87 f2fs: fix wrong condition to trigger background checkpoint correctly
  241a9657dda5 f2fs: set SBI_NEED_FSCK flag when inconsistent node block found
  de9f6680a24a f2fs: include non-compressed blocks in compr_written_block
  6d774f233dbd f2fs: introduce excess_dirty_threshold()
  8698114aad34 f2fs: replace snprintf in show functions with sysfs_emit
  1edfc9e068cc f2fs: avoid attaching SB_ACTIVE flag during mount
  5f8b2e61df4a f2fs: introduce fragment allocation mode mount option
  3ca2d068d5a4 f2fs: multidevice: support direct IO
  721e9cc848c4 f2fs: quota: fix potential deadlock
  17d4b0d96b3b f2fs: compress: fix overwrite may reduce compress ratio unproperly
  e0cb7a15f47a f2fs: should use GFP_NOFS for directory inodes
  4c7449b48bb6 f2fs: compress: disallow disabling compress on non-empty compressed file
  
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 kernel BUG in notify_change (2) C error 2 897d 897d 0/2 closed as invalid on 2022/05/06 17:34
android-5-10 kernel BUG in notify_change (3) C error 2 777d 777d 2/2 fixed on 2022/10/03 16:13
android-5-10 kernel BUG in notify_change C error 3 963d 1023d 2/2 fixed on 2022/03/05 17:38
android-54 kernel BUG in notify_change C 18 774d 1318d 2/2 fixed on 2022/09/20 15:04
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/11/23 10:36 16m jun.nie@linaro.org patch android13-5.15-lts OK log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2022/11/17 03:43 19m bisect fix android13-5.15-lts OK (0) job log log

Sample crash report:
kernel BUG at fs/attr.c:377!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 412 Comm: syz-executor879 Not tainted 5.15.73-syzkaller-04348-g44b8b2ac1d96 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:notify_change+0x103e/0x1040 fs/attr.c:377
Code: f0 ff e9 61 fa ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 79 f5 ff ff 4c 89 e7 e8 2c 12 f0 ff e9 6c f5 ff ff e8 92 c5 ad ff <0f> 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 50 41 89 f4 49 89 fd
RSP: 0018:ffffc900002cfaf0 EFLAGS: 00010293
RAX: ffffffff81c3cbfe RBX: 0000000000001847 RCX: ffff8881071813c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900002cfb78 R08: ffffffff81c3c198 R09: ffffc900002cfa60
R10: fffff52000059f4e R11: 1ffff92000059f4c R12: ffffc900002cfd40
R13: ffff88811e069cc0 R14: dffffc0000000000 R15: 0000000000000001
FS:  0000555555d6b300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 000000011f755000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 incfs_setattr+0x238/0x3c0 fs/incfs/vfs.c:1628
 notify_change+0xd8f/0x1040 fs/attr.c:426
 chown_common+0x526/0x7e0 fs/open.c:681
 do_fchownat+0x175/0x250 fs/open.c:712
 __do_sys_chown fs/open.c:732 [inline]
 __se_sys_chown fs/open.c:730 [inline]
 __x64_sys_chown+0x82/0x90 fs/open.c:730
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f0aecbc2ba9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd8da001a8 EFLAGS: 00000246 ORIG_RAX: 000000000000005c
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f0aecbc2ba9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000300
RBP: 2f30656c69662f2e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0aecb86de0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 81a5101ef8a25cb2 ]---
RIP: 0010:notify_change+0x103e/0x1040 fs/attr.c:377
Code: f0 ff e9 61 fa ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 79 f5 ff ff 4c 89 e7 e8 2c 12 f0 ff e9 6c f5 ff ff e8 92 c5 ad ff <0f> 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 50 41 89 f4 49 89 fd
RSP: 0018:ffffc900002cfaf0 EFLAGS: 00010293
RAX: ffffffff81c3cbfe RBX: 0000000000001847 RCX: ffff8881071813c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900002cfb78 R08: ffffffff81c3c198 R09: ffffc900002cfa60
R10: fffff52000059f4e R11: 1ffff92000059f4c R12: ffffc900002cfd40
R13: ffff88811e069cc0 R14: dffffc0000000000 R15: 0000000000000001
FS:  0000555555d6b300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 000000011f755000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/16 15:28 android13-5.15-lts 44b8b2ac1d96 67cb024c .config strace log report syz C [disk image] [vmlinux] ci2-android-5-15 kernel BUG in notify_change
2022/10/16 15:11 android13-5.15-lts 44b8b2ac1d96 67cb024c .config console log report info [disk image] [vmlinux] ci2-android-5-15 kernel BUG in notify_change
* Struck through repros no longer work on HEAD.