syzbot


kernel BUG in folio_set_bh

Status: upstream: reported C repro on 2025/07/03 02:18
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+f4f84b57a01d6b8364ad@syzkaller.appspotmail.com
First crash: 1d03h, last: 1d03h
Cause bisection: introduced by (bisect log) :
commit 47dd67532303803a87f43195e088b3b4bcf0454d
Author: Luis Chamberlain <mcgrof@kernel.org>
Date: Fri Feb 21 22:38:22 2025 +0000

  block/bdev: lift block size restrictions to 64k

Crash: BUG: unable to handle kernel NULL pointer dereference in guard_bio_eod (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [exfat?] kernel BUG in folio_set_bh 0 (2) 2025/07/03 08:07

Sample crash report:
loop0: detected capacity change from 0 to 128
------------[ cut here ]------------
kernel BUG at fs/buffer.c:1582!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 1 UID: 0 PID: 6151 Comm: syz.0.51 Not tainted 6.16.0-rc4-next-20250702-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:folio_set_bh+0x1dc/0x1e0 fs/buffer.c:1582
Code: 4c 89 e2 e8 d6 eb b6 02 e9 42 ff ff ff e8 cc 7c 79 ff 48 89 df 48 c7 c6 a0 ec 99 8b e8 ad af c1 ff 90 0f 0b e8 b5 7c 79 ff 90 <0f> 0b 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f
RSP: 0018:ffffc90003c5f8e0 EFLAGS: 00010293
RAX: ffffffff8246582b RBX: ffffea0001840a40 RCX: ffff8880776c3c00
RDX: 0000000000000000 RSI: 0000000000001000 RDI: 0000000000001000
RBP: dffffc0000000000 R08: ffffea0001840a47 R09: 1ffffd4000308148
R10: dffffc0000000000 R11: fffff94000308149 R12: 0000000000000000
R13: 0000000000001000 R14: ffff8880744cfcb0 R15: 0000000000001000
FS:  0000555591bcd500(0000) GS:ffff888125d1d000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5810d71d60 CR3: 0000000076ee0000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 folio_alloc_buffers+0x3a0/0x640 fs/buffer.c:946
 grow_dev_folio fs/buffer.c:1075 [inline]
 grow_buffers fs/buffer.c:1116 [inline]
 __getblk_slow fs/buffer.c:1134 [inline]
 bdev_getblk+0x286/0x660 fs/buffer.c:1461
 __bread_gfp+0x89/0x3c0 fs/buffer.c:1515
 sb_bread include/linux/buffer_head.h:346 [inline]
 fat_fill_super+0x5e2/0x3570 fs/fat/inode.c:1598
 get_tree_bdev_flags+0x40b/0x4d0 fs/super.c:1681
 vfs_get_tree+0x92/0x2b0 fs/super.c:1804
 do_new_mount+0x24a/0xa40 fs/namespace.c:3902
 do_mount fs/namespace.c:4239 [inline]
 __do_sys_mount fs/namespace.c:4450 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4427
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5810d900ca
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe6ee42248 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe6ee422d0 RCX: 00007f5810d900ca
RDX: 0000200000000240 RSI: 0000200000000280 RDI: 00007ffe6ee42290
RBP: 0000200000000240 R08: 00007ffe6ee422d0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000280
R13: 00007ffe6ee42290 R14: 0000000000000221 R15: 0000200000000480
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:folio_set_bh+0x1dc/0x1e0 fs/buffer.c:1582
Code: 4c 89 e2 e8 d6 eb b6 02 e9 42 ff ff ff e8 cc 7c 79 ff 48 89 df 48 c7 c6 a0 ec 99 8b e8 ad af c1 ff 90 0f 0b e8 b5 7c 79 ff 90 <0f> 0b 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f
RSP: 0018:ffffc90003c5f8e0 EFLAGS: 00010293
RAX: ffffffff8246582b RBX: ffffea0001840a40 RCX: ffff8880776c3c00
RDX: 0000000000000000 RSI: 0000000000001000 RDI: 0000000000001000
RBP: dffffc0000000000 R08: ffffea0001840a47 R09: 1ffffd4000308148
R10: dffffc0000000000 R11: fffff94000308149 R12: 0000000000000000
R13: 0000000000001000 R14: ffff8880744cfcb0 R15: 0000000000001000
FS:  0000555591bcd500(0000) GS:ffff888125c1d000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9535e0f000 CR3: 0000000076ee0000 CR4: 00000000003526f0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/02 21:56 linux-next 50c8770a42fa 0cd59a8f .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_set_bh
* Struck through repros no longer work on HEAD.