From: syzbot <syzbot+ba71155d3eacc8f42477@syzkaller.appspotmail.com>
To: kent.overstreet@linux.dev, linux-bcachefs@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [bcachefs?] KASAN: slab-out-of-bounds Read in bch2_btree_node_read_done
Date: Mon, 29 Sep 2025 11:49:31 -0700 [thread overview]
Message-ID: <68dad4bb.a70a0220.10c4b.0086.GAE@google.com> (raw)
Hello,
syzbot found the following issue on:
HEAD commit: 083fc6d7fa0d Merge tag 'sched-urgent-2025-09-26' of git://..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16fbe2e2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f5b21423ca3f0a96
dashboard link: https://syzkaller.appspot.com/bug?extid=ba71155d3eacc8f42477
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16433d34580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e79f12580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/198ae77e2418/disk-083fc6d7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3d3f065fd75c/vmlinux-083fc6d7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e65812e9d7b0/bzImage-083fc6d7.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/5219cf8dcb94/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ba71155d3eacc8f42477@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-out-of-bounds in bch2_btree_node_read_done+0x950/0x5550 fs/bcachefs/btree_io.c:1128
Read of size 8 at addr ffff88805874a010 by task syz.0.17/6055
CPU: 0 UID: 0 PID: 6055 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
bch2_btree_node_read_done+0x950/0x5550 fs/bcachefs/btree_io.c:1128
btree_node_read_work+0x40e/0xe60 fs/bcachefs/btree_io.c:1440
bch2_btree_node_read+0x887/0x2a00 fs/bcachefs/btree_io.c:-1
__bch2_btree_root_read fs/bcachefs/btree_io.c:1906 [inline]
bch2_btree_root_read+0x5f0/0x760 fs/bcachefs/btree_io.c:1928
read_btree_roots+0x2c6/0x840 fs/bcachefs/recovery.c:615
bch2_fs_recovery+0x261f/0x3a50 fs/bcachefs/recovery.c:1006
bch2_fs_start+0xaaf/0xda0 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xb39/0x1520 fs/bcachefs/fs.c:2488
vfs_get_tree+0x8f/0x2b0 fs/super.c:1815
do_new_mount+0x2a2/0x9e0 fs/namespace.c:3808
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount+0x317/0x410 fs/namespace.c:4324
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:0x7feb1599066a
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:00007ffe09e19a98 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe09e19b20 RCX: 00007feb1599066a
RDX: 00002000000058c0 RSI: 0000200000000000 RDI: 00007ffe09e19ae0
RBP: 00002000000058c0 R08: 00007ffe09e19b20 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000000
R13: 00007ffe09e19ae0 R14: 00000000000058f2 R15: 0000200000000180
</TASK>
Allocated by task 6055:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4376 [inline]
__kvmalloc_node_noprof+0x28d/0x550 mm/slub.c:5067
btree_node_data_alloc+0xdc/0x270 fs/bcachefs/btree_cache.c:151
__bch2_btree_node_mem_alloc+0x1dc/0x2e0 fs/bcachefs/btree_cache.c:193
bch2_fs_btree_cache_init+0x314/0x880 fs/bcachefs/btree_cache.c:653
bch2_fs_alloc fs/bcachefs/super.c:998 [inline]
bch2_fs_open+0x1da6/0x26e0 fs/bcachefs/super.c:2433
bch2_fs_get_tree+0x44f/0x1520 fs/bcachefs/fs.c:2472
vfs_get_tree+0x8f/0x2b0 fs/super.c:1815
do_new_mount+0x2a2/0x9e0 fs/namespace.c:3808
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount+0x317/0x410 fs/namespace.c:4324
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
The buggy address belongs to the object at ffff888058748000
which belongs to the cache kmalloc-rcl-8k of size 8192
The buggy address is located 16 bytes to the right of
allocated 8192-byte region [ffff888058748000, ffff88805874a000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58748
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff8880273c6ce1
flags: 0x80000000000040(head|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000040 ffff8880198483c0 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080020002 00000000f5000000 ffff8880273c6ce1
head: 0080000000000040 ffff8880198483c0 dead000000000122 0000000000000000
head: 0000000000000000 0000000080020002 00000000f5000000 ffff8880273c6ce1
head: 0080000000000003 ffffea000161d201 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x528d0(GFP_NOWAIT|__GFP_RECLAIMABLE|__GFP_IO|__GFP_FS|__GFP_NORETRY|__GFP_COMP), pid 6055, tgid 6055 (syz.0.17), ts 114481807879, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x2119/0x21b0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148
alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:2492 [inline]
allocate_slab+0x8a/0x370 mm/slub.c:2660
new_slab mm/slub.c:2714 [inline]
___slab_alloc+0x8d1/0xdc0 mm/slub.c:3901
__slab_alloc mm/slub.c:3992 [inline]
__slab_alloc_node mm/slub.c:4067 [inline]
slab_alloc_node mm/slub.c:4228 [inline]
__do_kmalloc_node mm/slub.c:4375 [inline]
__kvmalloc_node_noprof+0x1d6/0x550 mm/slub.c:5067
btree_node_data_alloc+0xdc/0x270 fs/bcachefs/btree_cache.c:151
__bch2_btree_node_mem_alloc+0x1dc/0x2e0 fs/bcachefs/btree_cache.c:193
bch2_fs_btree_cache_init+0x314/0x880 fs/bcachefs/btree_cache.c:653
bch2_fs_alloc fs/bcachefs/super.c:998 [inline]
bch2_fs_open+0x1da6/0x26e0 fs/bcachefs/super.c:2433
bch2_fs_get_tree+0x44f/0x1520 fs/bcachefs/fs.c:2472
vfs_get_tree+0x8f/0x2b0 fs/super.c:1815
do_new_mount+0x2a2/0x9e0 fs/namespace.c:3808
do_mount fs/namespace.c:4136 [inline]
__do_sys_mount fs/namespace.c:4347 [inline]
__se_sys_mount+0x317/0x410 fs/namespace.c:4324
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
page_owner free stack trace missing
Memory state around the buggy address:
ffff888058749f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888058749f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88805874a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88805874a080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88805874a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
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
next reply other threads:[~2025-09-29 18:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 18:49 syzbot [this message]
2025-09-30 3:42 ` [syzbot] [bcachefs?] KASAN: slab-out-of-bounds Read in bch2_btree_node_read_done Edward Adam Davis
2025-09-30 3:44 ` syzbot
2025-09-30 4:04 ` Edward Adam Davis
2025-09-30 4:35 ` syzbot
2025-09-30 5:11 ` [PATCH] bcachefs: Prevent written from exceeding sectors Edward Adam Davis
2025-09-30 20:46 ` kernel test robot
2025-10-01 0:19 ` [PATCH V2] " Edward Adam Davis
2025-11-07 0:50 ` [syzbot] [bcachefs?] KASAN: slab-out-of-bounds Read in bch2_btree_node_read_done syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68dad4bb.a70a0220.10c4b.0086.GAE@google.com \
--to=syzbot+ba71155d3eacc8f42477@syzkaller.appspotmail.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.