syzbot


kernel BUG in evict

Status: upstream: reported C repro on 2024/04/20 12:22
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+33fde3715ff1561d9688@syzkaller.appspotmail.com
First crash: 37d, last: 4d12h
Fix commit to backport (bisect log) :
tree: upstream
commit 9b5a04ac3ad9898c4745cba46ea26de74ba56a8e
Author: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Date: Tue May 9 15:29:56 2023 +0000

  nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()

  
Bug presence (2)
Date Name Commit Repro Result
2024/04/20 linux-6.1.y (ToT) 6741e066ec76 C [report] kernel BUG in evict
2024/04/20 upstream (ToT) 977b1ef51866 C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 kernel BUG in evict origin:lts-only C 22 4d13h 37d 0/3 upstream: reported C repro on 2024/04/20 12:09
upstream kernel BUG in evict fs 1 292d 288d 0/26 auto-obsoleted due to no activity on 2023/11/06 19:12
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/05/02 15:51 4h44m fix candidate upstream job log (1)

Sample crash report:
loop0: detected capacity change from 0 to 2048
NILFS (loop0): nilfs_palloc_commit_free_entry (ino=6): entry number 6 already freed
------------[ cut here ]------------
kernel BUG at fs/inode.c:678!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3542 Comm: syz-executor388 Not tainted 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:evict+0x615/0x620 fs/inode.c:678
Code: fe c1 38 c1 0f 8c de fc ff ff 4c 89 ff e8 e3 61 e9 ff e9 d1 fc ff ff e8 b9 ea 91 ff 0f 0b e8 b2 ea 91 ff 0f 0b e8 ab ea 91 ff <0f> 0b e8 a4 ea 91 ff 0f 0b 66 90 41 56 53 49 89 fe e8 95 ea 91 ff
RSP: 0018:ffffc90003a0f8c8 EFLAGS: 00010293
RAX: ffffffff81f8a4b5 RBX: 0000000000000064 RCX: ffff8880297c3b80
RDX: 0000000000000000 RSI: 0000000000000064 RDI: 0000000000000060
RBP: ffff8880704b2850 R08: ffffffff81f8a346 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffff8880704b27f0
R13: ffff8880704b2850 R14: dffffc0000000000 R15: ffff8880704b27c8
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd978e4d08 CR3: 0000000021dc0000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 nilfs_put_root+0x93/0xb0 fs/nilfs2/the_nilfs.c:910
 nilfs_segctor_destroy fs/nilfs2/segment.c:2787 [inline]
 nilfs_detach_log_writer+0x8b6/0xbd0 fs/nilfs2/segment.c:2850
 nilfs_put_super+0x49/0x150 fs/nilfs2/super.c:498
 generic_shutdown_super+0x130/0x340 fs/super.c:501
 kill_block_super+0x7a/0xe0 fs/super.c:1459
 deactivate_locked_super+0xa0/0x110 fs/super.c:332
 cleanup_mnt+0x490/0x520 fs/namespace.c:1186
 task_work_run+0x246/0x300 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xa73/0x26a0 kernel/exit.c:869
 do_group_exit+0x202/0x2b0 kernel/exit.c:1019
 __do_sys_exit_group kernel/exit.c:1030 [inline]
 __se_sys_exit_group kernel/exit.c:1028 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f2306989789
Code: Unable to access opcode bytes at 0x7f230698975f.
RSP: 002b:00007ffc7132fa78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f2306989789
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f2306a052b0 R08: ffffffffffffffb8 R09: 00007ffc7132fb50
R10: 00007ffc7132f9a0 R11: 0000000000000246 R12: 00007f2306a052b0
R13: 0000000000000000 R14: 00007f2306a06020 R15: 00007f2306957cc0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:evict+0x615/0x620 fs/inode.c:678
Code: fe c1 38 c1 0f 8c de fc ff ff 4c 89 ff e8 e3 61 e9 ff e9 d1 fc ff ff e8 b9 ea 91 ff 0f 0b e8 b2 ea 91 ff 0f 0b e8 ab ea 91 ff <0f> 0b e8 a4 ea 91 ff 0f 0b 66 90 41 56 53 49 89 fe e8 95 ea 91 ff
RSP: 0018:ffffc90003a0f8c8 EFLAGS: 00010293
RAX: ffffffff81f8a4b5 RBX: 0000000000000064 RCX: ffff8880297c3b80
RDX: 0000000000000000 RSI: 0000000000000064 RDI: 0000000000000060
RBP: ffff8880704b2850 R08: ffffffff81f8a346 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffff8880704b27f0
R13: ffff8880704b2850 R14: dffffc0000000000 R15: ffff8880704b27c8
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd978e4d08 CR3: 0000000021dc0000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/20 16:28 linux-6.1.y 6741e066ec76 af24b050 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan kernel BUG in evict
2024/05/23 05:47 linux-6.1.y 4078fa637fcd 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in evict
2024/05/23 00:25 linux-6.1.y 4078fa637fcd 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in evict
2024/04/20 12:22 linux-6.1.y 6741e066ec76 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in evict
2024/05/23 04:45 linux-6.1.y 4078fa637fcd 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 kernel BUG in evict
* Struck through repros no longer work on HEAD.