linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [exfat?] kernel BUG in folio_set_bh
@ 2025-07-03  2:18 syzbot
  2025-07-03  8:07 ` syzbot
  0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2025-07-03  2:18 UTC (permalink / raw)
  To: hirofumi, linkinjeon, linux-fsdevel, linux-kernel, sj1557.seo,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    50c8770a42fa Add linux-next specific files for 20250702
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1500f982580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d831c9dfe03f77ec
dashboard link: https://syzkaller.appspot.com/bug?extid=f4f84b57a01d6b8364ad
compiler:       Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15c93770580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1001aebc580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eb40fda2e0ca/disk-50c8770a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cba4d214940c/vmlinux-50c8770a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4b23ed647866/bzImage-50c8770a.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/ef503c02b7ee/mount_0.gz
  fsck result: OK (log: https://syzkaller.appspot.com/x/fsck.log?x=11c93770580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f4f84b57a01d6b8364ad@syzkaller.appspotmail.com

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


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [syzbot] [exfat?] kernel BUG in folio_set_bh
  2025-07-03  2:18 [syzbot] [exfat?] kernel BUG in folio_set_bh syzbot
@ 2025-07-03  8:07 ` syzbot
  2025-07-05  2:17   ` Luis Chamberlain
  0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2025-07-03  8:07 UTC (permalink / raw)
  To: axboe, brauner, hare, hirofumi, linkinjeon, linux-block,
	linux-fsdevel, linux-kernel, mcgrof, sj1557.seo, syzkaller-bugs,
	willy

syzbot has bisected this issue to:

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

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=15ec33d4580000
start commit:   50c8770a42fa Add linux-next specific files for 20250702
git tree:       linux-next
final oops:     https://syzkaller.appspot.com/x/report.txt?x=17ec33d4580000
console output: https://syzkaller.appspot.com/x/log.txt?x=13ec33d4580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d831c9dfe03f77ec
dashboard link: https://syzkaller.appspot.com/bug?extid=f4f84b57a01d6b8364ad
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15c93770580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1001aebc580000

Reported-by: syzbot+f4f84b57a01d6b8364ad@syzkaller.appspotmail.com
Fixes: 47dd67532303 ("block/bdev: lift block size restrictions to 64k")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [syzbot] [exfat?] kernel BUG in folio_set_bh
  2025-07-03  8:07 ` syzbot
@ 2025-07-05  2:17   ` Luis Chamberlain
  0 siblings, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2025-07-05  2:17 UTC (permalink / raw)
  To: syzbot
  Cc: axboe, brauner, hare, hirofumi, linkinjeon, linux-block,
	linux-fsdevel, linux-kernel, sj1557.seo, syzkaller-bugs, willy,
	p.raghav

On Thu, Jul 03, 2025 at 01:07:02AM -0700, syzbot wrote:
> syzbot has bisected this issue to:
> 
> 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
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=15ec33d4580000
> start commit:   50c8770a42fa Add linux-next specific files for 20250702
> git tree:       linux-next
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=17ec33d4580000
> console output: https://syzkaller.appspot.com/x/log.txt?x=13ec33d4580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d831c9dfe03f77ec
> dashboard link: https://syzkaller.appspot.com/bug?extid=f4f84b57a01d6b8364ad
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15c93770580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1001aebc580000
> 
> Reported-by: syzbot+f4f84b57a01d6b8364ad@syzkaller.appspotmail.com
> Fixes: 47dd67532303 ("block/bdev: lift block size restrictions to 64k")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Odd, I can't see where the null pointer comes from.

bdev_getblk() --> __getblk_slow() properly returns NULL and doesn't use
the data. But neither does fat_fill_super() on failure. My only
suspicion was on fat_msg() but that sb usage seems fine and the goto out_fail
seems fine as iput() also doesn't process null inodes and unload_nls()
is fine. The return value is also set to -EIO correctly so we don't return NULL
actually. I jus tdon't see anything odd on _fat_msg() either.

Hrm..

  Luis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-05  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03  2:18 [syzbot] [exfat?] kernel BUG in folio_set_bh syzbot
2025-07-03  8:07 ` syzbot
2025-07-05  2:17   ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).