Hello,
syzbot found the following issue on:
HEAD commit: 50cbba13faa2 Linux 6.1.159
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14b26074580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=6a5cbd268406bf43
dashboard link:
https://syzkaller.appspot.com/bug?extid=5918f887fe8b87387b45
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=16402922580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=17a6fe9a580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/50ceb00b1b39/disk-50cbba13.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/ebb8883b9a29/vmlinux-50cbba13.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/7edc2a795f03/bzImage-50cbba13.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/a5cdbe7114e1/mount_0.gz
fsck result: failed (log:
https://syzkaller.appspot.com/x/fsck.log?x=13a6fe9a580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+5918f8...@syzkaller.appspotmail.com
RBP: 00007f5f05213f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5f053e6128 R14: 00007f5f053e6090 R15: 00007fff8b3382c8
</TASK>
F2FS-fs (loop0): sanity_check_extent_cache: inode (ino=5) extent info [0, 0, 65536] is incorrect, run fsck to fix
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
BUG: KASAN: use-after-free in __destroy_extent_node+0x96/0x200 fs/f2fs/extent_cache.c:942
Read of size 4 at addr ffff888072bec070 by task syz.0.17/4424
CPU: 1 PID: 4424 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
instrument_atomic_read include/linux/instrumented.h:72 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
__destroy_extent_node+0x96/0x200 fs/f2fs/extent_cache.c:942
__destroy_extent_tree fs/f2fs/extent_cache.c:1005 [inline]
f2fs_destroy_extent_tree+0x218/0x5f0 fs/f2fs/extent_cache.c:1022
f2fs_evict_inode+0x460/0x17d0 fs/f2fs/inode.c:781
evict+0x485/0x870 fs/inode.c:705
f2fs_iget+0x1888/0x4b30 fs/f2fs/inode.c:565
f2fs_nfs_get_inode+0x72/0x100 fs/f2fs/super.c:3157
generic_fh_to_dentry+0x8f/0xe0 fs/libfs.c:1072
exportfs_decode_fh_raw+0x12a/0x640 fs/exportfs/expfs.c:435
exportfs_decode_fh+0x36/0x70 fs/exportfs/expfs.c:575
do_handle_to_path fs/fhandle.c:152 [inline]
handle_to_path fs/fhandle.c:207 [inline]
do_handle_open+0x3df/0x810 fs/fhandle.c:223
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5f0518f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5f060d0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 00007f5f053e6090 RCX: 00007f5f0518f749
RDX: 0000000002000000 RSI: 00002000000000c0 RDI: ffffffffffffff9c
RBP: 00007f5f05213f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5f053e6128 R14: 00007f5f053e6090 R15: 00007fff8b3382c8
</TASK>
Allocated by task 4418:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
slab_alloc_node mm/slub.c:3359 [inline]
slab_alloc mm/slub.c:3367 [inline]
__kmem_cache_alloc_lru mm/slub.c:3374 [inline]
kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3383
f2fs_kmem_cache_alloc_nofail fs/f2fs/f2fs.h:2786 [inline]
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2796 [inline]
__grab_extent_tree+0x19b/0x3d0 fs/f2fs/extent_cache.c:384
f2fs_init_read_extent_tree+0x29e/0x7c0 fs/f2fs/extent_cache.c:455
do_read_inode fs/f2fs/inode.c:459 [inline]
f2fs_iget+0x36e1/0x4b30 fs/f2fs/inode.c:512
f2fs_nfs_get_inode+0x72/0x100 fs/f2fs/super.c:3157
generic_fh_to_dentry+0x8f/0xe0 fs/libfs.c:1072
exportfs_decode_fh_raw+0x12a/0x640 fs/exportfs/expfs.c:435
exportfs_decode_fh+0x36/0x70 fs/exportfs/expfs.c:575
do_handle_to_path fs/fhandle.c:152 [inline]
handle_to_path fs/fhandle.c:207 [inline]
do_handle_open+0x3df/0x810 fs/fhandle.c:223
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 4418:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
kmem_cache_free+0xf7/0x290 mm/slub.c:3709
__destroy_extent_tree fs/f2fs/extent_cache.c:1011 [inline]
f2fs_destroy_extent_tree+0x2c3/0x5f0 fs/f2fs/extent_cache.c:1022
f2fs_evict_inode+0x460/0x17d0 fs/f2fs/inode.c:781
evict+0x485/0x870 fs/inode.c:705
f2fs_iget+0x1888/0x4b30 fs/f2fs/inode.c:565
f2fs_nfs_get_inode+0x72/0x100 fs/f2fs/super.c:3157
generic_fh_to_dentry+0x8f/0xe0 fs/libfs.c:1072
exportfs_decode_fh_raw+0x12a/0x640 fs/exportfs/expfs.c:435
exportfs_decode_fh+0x36/0x70 fs/exportfs/expfs.c:575
do_handle_to_path fs/fhandle.c:152 [inline]
handle_to_path fs/fhandle.c:207 [inline]
do_handle_open+0x3df/0x810 fs/fhandle.c:223
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff888072bec000
which belongs to the cache f2fs_extent_tree of size 136
The buggy address is located 112 bytes inside of
136-byte region [ffff888072bec000, ffff888072bec088)
The buggy address belongs to the physical page:
page:ffffea0001cafb00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x72bec
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888147ef6dc0
raw: 0000000000000000 0000000080140014 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4418, tgid 4417 (syz.0.17), ts 95650864756, free_ts 95062077282
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1997
___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
slab_alloc mm/slub.c:3367 [inline]
__kmem_cache_alloc_lru mm/slub.c:3374 [inline]
kmem_cache_alloc+0x1b7/0x2f0 mm/slub.c:3383
f2fs_kmem_cache_alloc_nofail fs/f2fs/f2fs.h:2786 [inline]
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2796 [inline]
__grab_extent_tree+0x19b/0x3d0 fs/f2fs/extent_cache.c:384
f2fs_init_read_extent_tree+0x29e/0x7c0 fs/f2fs/extent_cache.c:455
do_read_inode fs/f2fs/inode.c:459 [inline]
f2fs_iget+0x36e1/0x4b30 fs/f2fs/inode.c:512
f2fs_nfs_get_inode+0x72/0x100 fs/f2fs/super.c:3157
generic_fh_to_dentry+0x8f/0xe0 fs/libfs.c:1072
exportfs_decode_fh_raw+0x12a/0x640 fs/exportfs/expfs.c:435
exportfs_decode_fh+0x36/0x70 fs/exportfs/expfs.c:575
do_handle_to_path fs/fhandle.c:152 [inline]
handle_to_path fs/fhandle.c:207 [inline]
do_handle_open+0x3df/0x810 fs/fhandle.c:223
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
free_slab mm/slub.c:2036 [inline]
discard_slab mm/slub.c:2042 [inline]
__unfreeze_partials+0x1a5/0x200 mm/slub.c:2591
put_cpu_partial+0x17c/0x250 mm/slub.c:2667
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
slab_alloc_node mm/slub.c:3359 [inline]
kmem_cache_alloc_node+0x14d/0x320 mm/slub.c:3404
__alloc_skb+0xfc/0x7e0 net/core/skbuff.c:505
alloc_skb include/linux/skbuff.h:1271 [inline]
nlmsg_new include/net/netlink.h:991 [inline]
inet6_netconf_notify_devconf+0x10b/0x1d0 net/ipv6/addrconf.c:582
__addrconf_sysctl_unregister net/ipv6/addrconf.c:7183 [inline]
addrconf_sysctl_unregister net/ipv6/addrconf.c:7207 [inline]
addrconf_ifdown+0x16c4/0x1a10 net/ipv6/addrconf.c:3951
addrconf_notify+0x405/0xf40 net/ipv6/addrconf.c:-1
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
call_netdevice_notifiers net/core/dev.c:2053 [inline]
unregister_netdevice_many+0xfdc/0x1840 net/core/dev.c:10990
vti6_exit_batch_net+0x3c6/0x410 net/ipv6/ip6_vti.c:1191
Memory state around the buggy address:
ffff888072bebf00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
ffff888072bebf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888072bec000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888072bec080: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888072bec100: 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
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 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