R13: 0000200000000280 R14: 0032656c69662f2e R15: 0033656c69662f2e
==================================================================
BUG: KASAN: use-after-free in sanity_check_inode fs/f2fs/inode.c:275 [inline]
BUG: KASAN: use-after-free in do_read_inode fs/f2fs/inode.c:415 [inline]
BUG: KASAN: use-after-free in f2fs_iget+0x43aa/0x4dc0 fs/f2fs/inode.c:514
Read of size 4 at addr ffff88812141bf78 by task syz-executor150/338
CPU: 0 PID: 338 Comm: syz-executor150 Not tainted 5.10.240-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:77
dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:435 [inline]
kasan_report+0xe2/0x130 mm/kasan/report.c:452
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
sanity_check_inode fs/f2fs/inode.c:275 [inline]
do_read_inode fs/f2fs/inode.c:415 [inline]
f2fs_iget+0x43aa/0x4dc0 fs/f2fs/inode.c:514
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
lookup_open fs/namei.c:3226 [inline]
open_last_lookups fs/namei.c:3317 [inline]
path_openat+0x1127/0x3160 fs/namei.c:3506
do_filp_open+0x1b3/0x3e0 fs/namei.c:3536
do_sys_openat2+0x14c/0x6d0 fs/open.c:1217
do_sys_open fs/open.c:1233 [inline]
__do_sys_openat fs/open.c:1249 [inline]
__se_sys_openat fs/open.c:1244 [inline]
__x64_sys_openat+0x136/0x160 fs/open.c:1244
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f3eb3c17539
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3eb3bb3218 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f3eb3cae5f8 RCX: 00007f3eb3c17539
RDX: 0000000000101000 RSI: 0000200000000080 RDI: 00000000ffffff9c
RBP: 00007f3eb3cae5f0 R08: 00007ffd73bbb287 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000080
R13: 0000200000000280 R14: 0032656c69662f2e R15: 0033656c69662f2e
Allocated by task 299:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:430 [inline]
__kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:463
kasan_slab_alloc include/linux/kasan.h:244 [inline]
slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:583
slab_alloc_node mm/slub.c:2947 [inline]
slab_alloc mm/slub.c:2955 [inline]
kmem_cache_alloc+0x165/0x2e0 mm/slub.c:2960
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline]
__grab_extent_tree fs/f2fs/extent_cache.c:295 [inline]
__f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline]
f2fs_init_extent_tree+0x4bd/0xc40 fs/f2fs/extent_cache.c:404
do_read_inode fs/f2fs/inode.c:392 [inline]
f2fs_iget+0x1225/0x4dc0 fs/f2fs/inode.c:514
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
__lookup_slow+0x2aa/0x3e0 fs/namei.c:1640
lookup_slow+0x57/0x70 fs/namei.c:1657
walk_component+0x325/0x460 fs/namei.c:1952
lookup_last fs/namei.c:2403 [inline]
path_lookupat+0x180/0x490 fs/namei.c:2427
filename_lookup+0x1d5/0x600 fs/namei.c:2460
user_path_at_empty+0x43/0x50 fs/namei.c:2740
user_path_at include/linux/namei.h:60 [inline]
do_sys_truncate+0xa3/0x190 fs/open.c:132
__do_sys_truncate fs/open.c:146 [inline]
__se_sys_truncate fs/open.c:144 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:144
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
Freed by task 299:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
kasan_slab_free include/linux/kasan.h:220 [inline]
slab_free_hook mm/slub.c:1595 [inline]
slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1621
slab_free mm/slub.c:3203 [inline]
kmem_cache_free+0x100/0x2d0 mm/slub.c:3219
f2fs_destroy_extent_tree+0x2c0/0x4b0 fs/f2fs/extent_cache.c:845
f2fs_evict_inode+0x430/0x1420 fs/f2fs/inode.c:779
evict+0x478/0x910 fs/inode.c:612
iput_final fs/inode.c:1736 [inline]
iput+0x638/0x7c0 fs/inode.c:1762
iget_failed+0x17a/0x1c0 fs/bad_inode.c:242
f2fs_iget+0x2571/0x4dc0 fs/f2fs/inode.c:575
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
__lookup_slow+0x2aa/0x3e0 fs/namei.c:1640
lookup_slow+0x57/0x70 fs/namei.c:1657
walk_component+0x325/0x460 fs/namei.c:1952
lookup_last fs/namei.c:2403 [inline]
path_lookupat+0x180/0x490 fs/namei.c:2427
filename_lookup+0x1d5/0x600 fs/namei.c:2460
user_path_at_empty+0x43/0x50 fs/namei.c:2740
user_path_at include/linux/namei.h:60 [inline]
do_sys_truncate+0xa3/0x190 fs/open.c:132
__do_sys_truncate fs/open.c:146 [inline]
__se_sys_truncate fs/open.c:144 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:144
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
The buggy address belongs to the object at ffff88812141bf50
which belongs to the cache f2fs_extent_tree of size 80
The buggy address is located 40 bytes inside of
80-byte region [ffff88812141bf50, ffff88812141bfa0)
The buggy address belongs to the page:
page:ffffea00048506c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12141b
flags: 0x4000000000000200(slab)
raw: 4000000000000200 dead000000000100 dead000000000122 ffff888102791500
raw: 0000000000000000 0000000080240024 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 0x12c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_RECLAIMABLE), pid 318, ts 25328906639, free_ts 0
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2456 [inline]
prep_new_page+0x179/0x180 mm/page_alloc.c:2462
get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254
__alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5357
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1808 [inline]
new_slab+0x84/0x3f0 mm/slub.c:1869
new_slab_objects mm/slub.c:2627 [inline]
___slab_alloc+0x2a6/0x450 mm/slub.c:2791
__slab_alloc+0x63/0xa0 mm/slub.c:2831
slab_alloc_node mm/slub.c:2913 [inline]
slab_alloc mm/slub.c:2955 [inline]
kmem_cache_alloc+0x1af/0x2e0 mm/slub.c:2960
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline]
__grab_extent_tree fs/f2fs/extent_cache.c:295 [inline]
__f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline]
f2fs_init_extent_tree+0x4bd/0xc40 fs/f2fs/extent_cache.c:404
do_read_inode fs/f2fs/inode.c:392 [inline]
f2fs_iget+0x1225/0x4dc0 fs/f2fs/inode.c:514
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
lookup_open fs/namei.c:3226 [inline]
open_last_lookups fs/namei.c:3317 [inline]
path_openat+0x1127/0x3160 fs/namei.c:3506
do_filp_open+0x1b3/0x3e0 fs/namei.c:3536
do_sys_openat2+0x14c/0x6d0 fs/open.c:1217
do_sys_open fs/open.c:1233 [inline]
__do_sys_openat fs/open.c:1249 [inline]
__se_sys_openat fs/open.c:1244 [inline]
__x64_sys_openat+0x136/0x160 fs/open.c:1244
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
page_owner free stack trace missing
Memory state around the buggy address:
ffff88812141be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88812141be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88812141bf00: fc fc fc fc fc fc fc fc fc fc fa fb fb fb fb fb
^
ffff88812141bf80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
ffff88812141c000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
F2FS-fs (loop1): sanity_check_inode: inode (ino=8) extent info [14338, 0, 2147549187] is incorrect, run fsck to fix
==================================================================
BUG: KASAN: double-free or invalid-free in slab_free mm/slub.c:3203 [inline]
BUG: KASAN: double-free or invalid-free in kmem_cache_free+0x100/0x2d0 mm/slub.c:3219
CPU: 0 PID: 338 Comm: syz-executor150 Tainted: G B 5.10.240-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:77
dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
kasan_report_invalid_free+0x3f/0x70 mm/kasan/report.c:374
____kasan_slab_free+0x13d/0x160 mm/kasan/common.c:-1
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
kasan_slab_free include/linux/kasan.h:220 [inline]
slab_free_hook mm/slub.c:1595 [inline]
slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1621
slab_free mm/slub.c:3203 [inline]
kmem_cache_free+0x100/0x2d0 mm/slub.c:3219
f2fs_destroy_extent_tree+0x2c0/0x4b0 fs/f2fs/extent_cache.c:845
f2fs_evict_inode+0x430/0x1420 fs/f2fs/inode.c:779
evict+0x478/0x910 fs/inode.c:612
iput_final fs/inode.c:1736 [inline]
iput+0x638/0x7c0 fs/inode.c:1762
iget_failed+0x17a/0x1c0 fs/bad_inode.c:242
f2fs_iget+0x2571/0x4dc0 fs/f2fs/inode.c:575
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
lookup_open fs/namei.c:3226 [inline]
open_last_lookups fs/namei.c:3317 [inline]
path_openat+0x1127/0x3160 fs/namei.c:3506
do_filp_open+0x1b3/0x3e0 fs/namei.c:3536
do_sys_openat2+0x14c/0x6d0 fs/open.c:1217
do_sys_open fs/open.c:1233 [inline]
__do_sys_openat fs/open.c:1249 [inline]
__se_sys_openat fs/open.c:1244 [inline]
__x64_sys_openat+0x136/0x160 fs/open.c:1244
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f3eb3c17539
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3eb3bb3218 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f3eb3cae5f8 RCX: 00007f3eb3c17539
RDX: 0000000000101000 RSI: 0000200000000080 RDI: 00000000ffffff9c
RBP: 00007f3eb3cae5f0 R08: 00007ffd73bbb287 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000080
R13: 0000200000000280 R14: 0032656c69662f2e R15: 0033656c69662f2e
Allocated by task 299:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:430 [inline]
__kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:463
kasan_slab_alloc include/linux/kasan.h:244 [inline]
slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:583
slab_alloc_node mm/slub.c:2947 [inline]
slab_alloc mm/slub.c:2955 [inline]
kmem_cache_alloc+0x165/0x2e0 mm/slub.c:2960
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline]
__grab_extent_tree fs/f2fs/extent_cache.c:295 [inline]
__f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline]
f2fs_init_extent_tree+0x4bd/0xc40 fs/f2fs/extent_cache.c:404
do_read_inode fs/f2fs/inode.c:392 [inline]
f2fs_iget+0x1225/0x4dc0 fs/f2fs/inode.c:514
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
__lookup_slow+0x2aa/0x3e0 fs/namei.c:1640
lookup_slow+0x57/0x70 fs/namei.c:1657
walk_component+0x325/0x460 fs/namei.c:1952
lookup_last fs/namei.c:2403 [inline]
path_lookupat+0x180/0x490 fs/namei.c:2427
filename_lookup+0x1d5/0x600 fs/namei.c:2460
user_path_at_empty+0x43/0x50 fs/namei.c:2740
user_path_at include/linux/namei.h:60 [inline]
do_sys_truncate+0xa3/0x190 fs/open.c:132
__do_sys_truncate fs/open.c:146 [inline]
__se_sys_truncate fs/open.c:144 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:144
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
Freed by task 299:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
kasan_slab_free include/linux/kasan.h:220 [inline]
slab_free_hook mm/slub.c:1595 [inline]
slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1621
slab_free mm/slub.c:3203 [inline]
kmem_cache_free+0x100/0x2d0 mm/slub.c:3219
f2fs_destroy_extent_tree+0x2c0/0x4b0 fs/f2fs/extent_cache.c:845
f2fs_evict_inode+0x430/0x1420 fs/f2fs/inode.c:779
evict+0x478/0x910 fs/inode.c:612
iput_final fs/inode.c:1736 [inline]
iput+0x638/0x7c0 fs/inode.c:1762
iget_failed+0x17a/0x1c0 fs/bad_inode.c:242
f2fs_iget+0x2571/0x4dc0 fs/f2fs/inode.c:575
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
__lookup_slow+0x2aa/0x3e0 fs/namei.c:1640
lookup_slow+0x57/0x70 fs/namei.c:1657
walk_component+0x325/0x460 fs/namei.c:1952
lookup_last fs/namei.c:2403 [inline]
path_lookupat+0x180/0x490 fs/namei.c:2427
filename_lookup+0x1d5/0x600 fs/namei.c:2460
user_path_at_empty+0x43/0x50 fs/namei.c:2740
user_path_at include/linux/namei.h:60 [inline]
do_sys_truncate+0xa3/0x190 fs/open.c:132
__do_sys_truncate fs/open.c:146 [inline]
__se_sys_truncate fs/open.c:144 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:144
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
The buggy address belongs to the object at ffff88812141bf50
which belongs to the cache f2fs_extent_tree of size 80
The buggy address is located 0 bytes inside of
80-byte region [ffff88812141bf50, ffff88812141bfa0)
The buggy address belongs to the page:
page:ffffea00048506c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12141b
flags: 0x4000000000000200(slab)
raw: 4000000000000200 dead000000000100 dead000000000122 ffff888102791500
raw: 0000000000000000 0000000080240024 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 0x12c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_RECLAIMABLE), pid 318, ts 25328906639, free_ts 0
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2456 [inline]
prep_new_page+0x179/0x180 mm/page_alloc.c:2462
get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254
__alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5357
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1808 [inline]
new_slab+0x84/0x3f0 mm/slub.c:1869
new_slab_objects mm/slub.c:2627 [inline]
___slab_alloc+0x2a6/0x450 mm/slub.c:2791
__slab_alloc+0x63/0xa0 mm/slub.c:2831
slab_alloc_node mm/slub.c:2913 [inline]
slab_alloc mm/slub.c:2955 [inline]
kmem_cache_alloc+0x1af/0x2e0 mm/slub.c:2960
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:-1 [inline]
__grab_extent_tree fs/f2fs/extent_cache.c:295 [inline]
__f2fs_init_extent_tree fs/f2fs/extent_cache.c:381 [inline]
f2fs_init_extent_tree+0x4bd/0xc40 fs/f2fs/extent_cache.c:404
do_read_inode fs/f2fs/inode.c:392 [inline]
f2fs_iget+0x1225/0x4dc0 fs/f2fs/inode.c:514
f2fs_lookup+0x3ee/0xce0 fs/f2fs/namei.c:544
lookup_open fs/namei.c:3226 [inline]
open_last_lookups fs/namei.c:3317 [inline]
path_openat+0x1127/0x3160 fs/namei.c:3506
do_filp_open+0x1b3/0x3e0 fs/namei.c:3536
do_sys_openat2+0x14c/0x6d0 fs/open.c:1217
do_sys_open fs/open.c:1233 [inline]
__do_sys_openat fs/open.c:1249 [inline]
__se_sys_openat fs/open.c:1244 [inline]
__x64_sys_openat+0x136/0x160 fs/open.c:1244
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
page_owner free stack trace missing
Memory state around the buggy address:
ffff88812141be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88812141be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88812141bf00: fc fc fc fc fc fc fc fc fc fc fa fb fb fb fb fb
^
ffff88812141bf80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
ffff88812141c000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================