[v6.6] KASAN: null-ptr-deref Read in ext4_mb_load_buddy_gfp

0 views
Skip to first unread message

syzbot

unread,
Aug 13, 2026, 5:45:31 PM (18 hours ago) Aug 13
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d27334b2888c Linux 6.6.151
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17589c79580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link: https://syzkaller.appspot.com/bug?extid=fb51224696d83cc6a682
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/695139abd971/disk-d27334b2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b11fc121442a/vmlinux-d27334b2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e226f54f9286/bzImage-d27334b2.xz

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

loop0: detected capacity change from 0 to 128
EXT4-fs (loop0): mounted filesystem 76b65be2-f6da-4727-8c75-0525a5b65a09 r/w without journal. Quota mode: none.
ext4 filesystem being mounted at /24/mnt supports timestamps until 2038-01-19 (0x7fffffff)
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: null-ptr-deref in page_ref_count include/linux/page_ref.h:67 [inline]
BUG: KASAN: null-ptr-deref in put_page_testzero include/linux/mm.h:1110 [inline]
BUG: KASAN: null-ptr-deref in folio_put_testzero include/linux/mm.h:1116 [inline]
BUG: KASAN: null-ptr-deref in folio_put include/linux/mm.h:1491 [inline]
BUG: KASAN: null-ptr-deref in ext4_mb_load_buddy_gfp+0x603/0x1760 fs/ext4/mballoc.c:1745
Read of size 4 at addr 0000000000000028 by task syz.0.59/6093

CPU: 0 PID: 6093 Comm: syz.0.59 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
kasan_report+0x117/0x150 mm/kasan/report.c:581
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x241/0x290 mm/kasan/generic.c:187
instrument_atomic_read include/linux/instrumented.h:68 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
page_ref_count include/linux/page_ref.h:67 [inline]
put_page_testzero include/linux/mm.h:1110 [inline]
folio_put_testzero include/linux/mm.h:1116 [inline]
folio_put include/linux/mm.h:1491 [inline]
ext4_mb_load_buddy_gfp+0x603/0x1760 fs/ext4/mballoc.c:1745
ext4_mb_load_buddy fs/ext4/mballoc.c:1757 [inline]
ext4_mb_regular_allocator+0x1205/0x36c0 fs/ext4/mballoc.c:2937
ext4_mb_new_blocks+0xc9c/0x42f0 fs/ext4/mballoc.c:6254
ext4_ext_map_blocks+0x1811/0x68c0 fs/ext4/extents.c:4416
ext4_map_blocks+0x9db/0x1a90 fs/ext4/inode.c:654
ext4_getblk+0x1c9/0x720 fs/ext4/inode.c:864
ext4_bread+0x2a/0x170 fs/ext4/inode.c:920
ext4_init_symlink_block fs/ext4/namei.c:3395 [inline]
ext4_symlink+0x519/0x940 fs/ext4/namei.c:3472
vfs_symlink+0x138/0x2b0 fs/namei.c:4528
do_symlinkat+0x1ba/0x400 fs/namei.c:4554
__do_sys_symlinkat fs/namei.c:4570 [inline]
__se_sys_symlinkat fs/namei.c:4567 [inline]
__x64_sys_symlinkat+0x99/0xb0 fs/namei.c:4567
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fdc31f9e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdc32f1e028 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 00007fdc32225fa0 RCX: 00007fdc31f9e0d9
RDX: 00002000000005c0 RSI: ffffffffffffff9c RDI: 0000200000000700
RBP: 00007fdc32035024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fdc32226038 R14: 00007fdc32225fa0 R15: 00007ffe0836a418
</TASK>
==================================================================


---
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 syzk...@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 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

syzbot

unread,
2:30 AM (10 hours ago) 2:30 AM
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: d27334b2888c Linux 6.6.151
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1612fac6580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link: https://syzkaller.appspot.com/bug?extid=fb51224696d83cc6a682
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11ba8a25580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14690279580000
mounted in repro: https://storage.googleapis.com/syzbot-assets/8c5867635f4f/mount_0.gz
fsck result: OK (log: https://syzkaller.appspot.com/x/fsck.log?x=1336f149580000)

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

oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=test,mems_allowed=0-1,oom_memcg=/syz0/test,task_memcg=/syz0/test,task=syz.0.17,pid=5933,uid=0
Memory cgroup out of memory: Killed process 5933 (syz.0.17) total-vm:44920kB, anon-rss:1364kB, file-rss:1152kB, shmem-rss:0kB, UID:0 pgtables:80kB oom_score_adj:1000
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: null-ptr-deref in page_ref_count include/linux/page_ref.h:67 [inline]
BUG: KASAN: null-ptr-deref in put_page_testzero include/linux/mm.h:1110 [inline]
BUG: KASAN: null-ptr-deref in folio_put_testzero include/linux/mm.h:1116 [inline]
BUG: KASAN: null-ptr-deref in folio_put include/linux/mm.h:1491 [inline]
BUG: KASAN: null-ptr-deref in ext4_mb_load_buddy_gfp+0x603/0x1760 fs/ext4/mballoc.c:1745
Read of size 4 at addr 0000000000000028 by task syz.0.17/5933

CPU: 1 PID: 5933 Comm: syz.0.17 Not tainted syzkaller #0
RIP: 0033:0x7f55d299e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe25dabae8 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 00007f55d2c25fa0 RCX: 00007f55d299e0d9
RDX: 00002000000005c0 RSI: ffffffffffffff9c RDI: 0000200000000700
RBP: 00007f55d2a35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f55d2c25fac R14: 00007f55d2c25fa0 R15: 00007f55d2c25fa0
</TASK>
==================================================================


---
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.
Reply all
Reply to author
Forward
0 new messages