KASAN: use-after-free Read in f2fs_release_page (2)

Status: premoderation: reported on 2026/08/02 22:50
Reported-by: syzbot+4015ca82337c5a5bbea9@syzkaller.appspotmail.com
First crash: 1d16h, last: 1d16h
Similar bugs (8)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 general protection fault in f2fs_release_page f2fs 19 3 1286d 1328d 0/2 auto-obsoleted due to no activity on 2023/04/25 16:26
android-54 KASAN: use-after-free Read in f2fs_release_page f2fs 19 4 1218d 1318d 0/2 auto-obsoleted due to no activity on 2023/08/01 23:35
android-5-10 KASAN: use-after-free Read in f2fs_release_page 19 2 280d 289d 0/2 auto-obsoleted due to no activity on 2026/01/25 17:02
android-5-15 KASAN: use-after-free Read in f2fs_release_page f2fs 19 5 1157d 1306d 0/2 auto-obsoleted due to no activity on 2023/09/01 18:51
android-5-15 KASAN: use-after-free Read in f2fs_release_page (2) 19 1 947d 947d 0/2 auto-obsoleted due to no activity on 2024/03/30 07:06
android-5-10 KASAN: global-out-of-bounds Read in f2fs_release_page 19 2 1156d 1189d 0/2 auto-obsoleted due to no activity on 2023/09/02 15:33
android-5-15 general protection fault in f2fs_release_page 2 1 584d 584d 0/2 auto-obsoleted due to no activity on 2025/03/28 09:40
android-5-10 general protection fault in f2fs_release_page (2) 2 1 101d 101d 0/2 auto-obsoleted due to no activity on 2026/07/24 03:25

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in F2FS_SB fs/f2fs/f2fs.h:1985 [inline]
BUG: KASAN: use-after-free in F2FS_I_SB fs/f2fs/f2fs.h:1990 [inline]
BUG: KASAN: use-after-free in F2FS_M_SB fs/f2fs/f2fs.h:1995 [inline]
BUG: KASAN: use-after-free in F2FS_P_SB fs/f2fs/f2fs.h:2000 [inline]
BUG: KASAN: use-after-free in f2fs_release_page+0x2fa/0x7c0 fs/f2fs/data.c:3621
Read of size 8 at addr ffff88812719b3c8 by task syz.5.531/2531

CPU: 0 PID: 2531 Comm: syz.5.531 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x1a7/0x208 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+0x100/0x140 mm/kasan/report.c:452
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
 F2FS_SB fs/f2fs/f2fs.h:1985 [inline]
 F2FS_I_SB fs/f2fs/f2fs.h:1990 [inline]
 F2FS_M_SB fs/f2fs/f2fs.h:1995 [inline]
 F2FS_P_SB fs/f2fs/f2fs.h:2000 [inline]
 f2fs_release_page+0x2fa/0x7c0 fs/f2fs/data.c:3621
 try_to_release_page+0x18d/0x1e0 mm/filemap.c:3705
 shrink_page_list+0x1712/0x4160 mm/vmscan.c:1467
 shrink_inactive_list+0x90c/0xef0 mm/vmscan.c:2075
 shrink_list mm/vmscan.c:2294 [inline]
 shrink_lruvec+0x2806/0x2d70 mm/vmscan.c:5473
 shrink_node_memcgs mm/vmscan.c:5660 [inline]
 shrink_node+0xee0/0x2690 mm/vmscan.c:5690
 shrink_zones mm/vmscan.c:5896 [inline]
 do_try_to_free_pages+0x602/0x1590 mm/vmscan.c:5954
 try_to_free_mem_cgroup_pages+0x261/0x610 mm/vmscan.c:6272
 mem_cgroup_resize_max+0x309/0x3e0 mm/memcontrol.c:3383
 mem_cgroup_write+0x1ed/0x230 mm/memcontrol.c:-1
 cgroup_file_write+0x294/0x560 kernel/cgroup/cgroup.c:3902
 kernfs_fop_write_iter+0x2bd/0x400 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2066 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x770/0xd70 fs/read_write.c:605
 ksys_write+0x14a/0x260 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:667
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fa400a20019
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:00007fa3ff479028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fa400ca7fa0 RCX: 00007fa400a20019
RDX: 0000000000000001 RSI: 0000200000000080 RDI: 0000000000000004
RBP: 00007fa400ab700c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa400ca8038 R14: 00007fa400ca7fa0 R15: 00007ffe59c03878

Allocated by task 2193:
 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_kmalloc mm/kasan/common.c:509 [inline]
 __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:518
 kasan_kmalloc include/linux/kasan.h:254 [inline]
 kmem_cache_alloc_trace+0x179/0x2e0 mm/slub.c:2979
 kmalloc include/linux/slab.h:555 [inline]
 kzalloc include/linux/slab.h:667 [inline]
 alloc_super+0x5a/0x7d0 fs/super.c:203
 sget+0x1e2/0x4c0 fs/super.c:627
 mount_bdev+0xec/0x380 fs/super.c:1415
 f2fs_mount+0x34/0x40 fs/f2fs/super.c:4598
 legacy_get_tree+0xed/0x190 fs/fs_context.c:593
 vfs_get_tree+0x89/0x260 fs/super.c:1572
 do_new_mount+0x25a/0xa30 fs/namespace.c:3006
 path_mount+0x581/0xca0 fs/namespace.c:3336
 do_mount fs/namespace.c:3349 [inline]
 __do_sys_mount fs/namespace.c:3557 [inline]
 __se_sys_mount+0x320/0x390 fs/namespace.c:3534
 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3534
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 301:
 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:1600 [inline]
 slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626
 slab_free mm/slub.c:3208 [inline]
 kfree+0xc0/0x270 mm/slub.c:4196
 destroy_super_work+0x40/0x50 fs/super.c:165
 process_one_work+0x6fd/0xbc0 kernel/workqueue.c:2301
 worker_thread+0xa8e/0x13c0 kernel/workqueue.c:2447
 kthread+0x324/0x3b0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
 insert_work+0x51/0x320 kernel/workqueue.c:1352
 __queue_work+0x91f/0xca0 kernel/workqueue.c:1518
 queue_work_on+0xe6/0x140 kernel/workqueue.c:1545
 queue_work include/linux/workqueue.h:515 [inline]
 schedule_work include/linux/workqueue.h:576 [inline]
 destroy_super_rcu+0xd1/0xe0 fs/super.c:172
 rcu_do_batch+0x488/0xaf0 kernel/rcu/tree.c:2494
 rcu_core+0x50a/0xca0 kernel/rcu/tree.c:2735
 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2748
 __do_softirq+0x255/0x563 kernel/softirq.c:309

Second to last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
 __call_rcu kernel/rcu/tree.c:2980 [inline]
 call_rcu+0x11a/0x1090 kernel/rcu/tree.c:3054
 __put_super+0x254/0x2b0 fs/super.c:299
 put_super fs/super.c:313 [inline]
 deactivate_locked_super+0xd4/0x100 fs/super.c:346
 deactivate_super+0xaf/0xe0 fs/super.c:366
 cleanup_mnt+0x44f/0x500 fs/namespace.c:1123
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1130
 task_work_run+0x127/0x190 kernel/task_work.c:189
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop+0xcb/0xe0 kernel/entry/common.c:172
 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199
 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:274
 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

The buggy address belongs to the object at ffff88812719b000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 968 bytes inside of
 2048-byte region [ffff88812719b000, ffff88812719b800)
The buggy address belongs to the page:
page:ffffea00049c6600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x127198
head:ffffea00049c6600 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042d80
raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 279, ts 24303081474, 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+0x176/0x190 mm/page_alloc.c:2462
 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1813 [inline]
 new_slab+0x84/0x3f0 mm/slub.c:1874
 new_slab_objects mm/slub.c:2632 [inline]
 ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796
 __slab_alloc+0x63/0xa0 mm/slub.c:2836
 slab_alloc_node mm/slub.c:2918 [inline]
 slab_alloc mm/slub.c:2960 [inline]
 __kmalloc_track_caller+0x1e4/0x310 mm/slub.c:4541
 __kmalloc_reserve net/core/skbuff.c:144 [inline]
 pskb_expand_head+0x123/0x11c0 net/core/skbuff.c:1654
 netlink_trim+0x193/0x230 net/netlink/af_netlink.c:1295
 netlink_broadcast_filtered+0x75/0x12c0 net/netlink/af_netlink.c:1512
 netlink_broadcast net/netlink/af_netlink.c:1557 [inline]
 nlmsg_multicast include/net/netlink.h:1033 [inline]
 nlmsg_notify+0xe9/0x1a0 net/netlink/af_netlink.c:2551
 rtnl_notify net/core/rtnetlink.c:740 [inline]
 rtmsg_ifinfo_send net/core/rtnetlink.c:3872 [inline]
 rtmsg_ifinfo_event net/core/rtnetlink.c:3887 [inline]
 rtmsg_ifinfo+0xea/0x130 net/core/rtnetlink.c:3893
 __dev_notify_flags+0xe0/0x5b0 net/core/dev.c:8579
 rtnl_configure_link+0x221/0x340 net/core/rtnetlink.c:-1
 __rtnl_newlink net/core/rtnetlink.c:3494 [inline]
 rtnl_newlink+0x1428/0x1830 net/core/rtnetlink.c:3534
 rtnetlink_rcv_msg+0x9e9/0xca0 net/core/rtnetlink.c:5614
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88812719b280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88812719b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88812719b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff88812719b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88812719b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
general protection fault, probably for non-canonical address 0xdffffc00000000eb: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000758-0x000000000000075f]
CPU: 1 PID: 2531 Comm: syz.5.531 Tainted: G    B             syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:f2fs_release_page+0x30b/0x7c0 fs/f2fs/data.c:3621
Code: 4d 03 27 4c 89 e0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 e7 e8 a6 29 96 ff 41 bf 58 07 00 00 4d 03 3c 24 4c 89 f8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 1d 04 00 00 45 8b 3f 44 89 fe 81 e6 00
RSP: 0018:ffffc90001066c98 EFLAGS: 00010206
RAX: 00000000000000eb RBX: ffffea00046bff40 RCX: 0000000000080000
RDX: ffffc90009569000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc90001066cc8 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0dcf648 R12: ffff88812719b3c8
R13: dffffc0000000000 R14: 1ffffd40008d7fe9 R15: 0000000000000758
FS:  00007fa3ff4796c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557c7e2948 CR3: 0000000119762000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 try_to_release_page+0x18d/0x1e0 mm/filemap.c:3705
 shrink_page_list+0x1712/0x4160 mm/vmscan.c:1467
 shrink_inactive_list+0x90c/0xef0 mm/vmscan.c:2075
 shrink_list mm/vmscan.c:2294 [inline]
 shrink_lruvec+0x2806/0x2d70 mm/vmscan.c:5473
 shrink_node_memcgs mm/vmscan.c:5660 [inline]
 shrink_node+0xee0/0x2690 mm/vmscan.c:5690
 shrink_zones mm/vmscan.c:5896 [inline]
 do_try_to_free_pages+0x602/0x1590 mm/vmscan.c:5954
 try_to_free_mem_cgroup_pages+0x261/0x610 mm/vmscan.c:6272
 mem_cgroup_resize_max+0x309/0x3e0 mm/memcontrol.c:3383
 mem_cgroup_write+0x1ed/0x230 mm/memcontrol.c:-1
 cgroup_file_write+0x294/0x560 kernel/cgroup/cgroup.c:3902
 kernfs_fop_write_iter+0x2bd/0x400 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2066 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x770/0xd70 fs/read_write.c:605
 ksys_write+0x14a/0x260 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:667
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fa400a20019
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:00007fa3ff479028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fa400ca7fa0 RCX: 00007fa400a20019
RDX: 0000000000000001 RSI: 0000200000000080 RDI: 0000000000000004
RBP: 00007fa400ab700c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa400ca8038 R14: 00007fa400ca7fa0 R15: 00007ffe59c03878
Modules linked in:
---[ end trace 0e15a7bc821768ad ]---
RIP: 0010:f2fs_release_page+0x30b/0x7c0 fs/f2fs/data.c:3621
Code: 4d 03 27 4c 89 e0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 e7 e8 a6 29 96 ff 41 bf 58 07 00 00 4d 03 3c 24 4c 89 f8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 1d 04 00 00 45 8b 3f 44 89 fe 81 e6 00
RSP: 0018:ffffc90001066c98 EFLAGS: 00010206
RAX: 00000000000000eb RBX: ffffea00046bff40 RCX: 0000000000080000
RDX: ffffc90009569000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc90001066cc8 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff0dcf648 R12: ffff88812719b3c8
R13: dffffc0000000000 R14: 1ffffd40008d7fe9 R15: 0000000000000758
FS:  00007fa3ff4796c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557c7e2948 CR3: 0000000119762000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	4d 03 27             	add    (%r15),%r12
   3:	4c 89 e0             	mov    %r12,%rax
   6:	48 c1 e8 03          	shr    $0x3,%rax
   a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
   f:	74 08                	je     0x19
  11:	4c 89 e7             	mov    %r12,%rdi
  14:	e8 a6 29 96 ff       	call   0xff9629bf
  19:	41 bf 58 07 00 00    	mov    $0x758,%r15d
  1f:	4d 03 3c 24          	add    (%r12),%r15
  23:	4c 89 f8             	mov    %r15,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 28       	movzbl (%rax,%r13,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 1d 04 00 00    	jne    0x454
  37:	45 8b 3f             	mov    (%r15),%r15d
  3a:	44 89 fe             	mov    %r15d,%esi
  3d:	81                   	.byte 0x81
  3e:	e6 00                	out    %al,$0x0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/02 22:49 android13-5.10-lts 50b3a256e550 e611ffe1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in f2fs_release_page
* Struck through repros no longer work on HEAD.