syzbot


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

Status: upstream: reported on 2025/12/15 10:44
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+365d799c2cc252b698e4@syzkaller.appspotmail.com
First crash: 85d, last: 5d00h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [gfs2] KASAN: use-after-free Read in iomap_read_inline_data (2) 0 (1) 2025/12/15 10:44
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in iomap_read_inline_data iomap 19 1 497d 492d 0/29 auto-obsoleted due to no activity on 2024/12/31 10:38

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in folio_fill_tail include/linux/highmem.h:600 [inline]
BUG: KASAN: use-after-free in iomap_read_inline_data+0x6dd/0xbb0 fs/iomap/buffered-io.c:379
Read of size 45 at addr ffff888012eea8e8 by task syz.0.0/5324

CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xba/0x230 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105
 folio_fill_tail include/linux/highmem.h:600 [inline]
 iomap_read_inline_data+0x6dd/0xbb0 fs/iomap/buffered-io.c:379
 iomap_write_begin_inline fs/iomap/buffered-io.c:899 [inline]
 iomap_write_begin+0xd76/0x14f0 fs/iomap/buffered-io.c:976
 iomap_write_iter fs/iomap/buffered-io.c:1108 [inline]
 iomap_file_buffered_write+0x47a/0xb30 fs/iomap/buffered-io.c:1189
 gfs2_file_buffered_write+0x4eb/0x870 fs/gfs2/file.c:1061
 gfs2_file_write_iter+0x976/0x1130 fs/gfs2/file.c:1166
 iter_file_splice_write+0x99b/0x1100 fs/splice.c:738
 do_splice_from fs/splice.c:938 [inline]
 direct_splice_actor+0x101/0x160 fs/splice.c:1161
 splice_direct_to_actor+0x53a/0xc70 fs/splice.c:1105
 do_splice_direct_actor fs/splice.c:1204 [inline]
 do_splice_direct+0x195/0x290 fs/splice.c:1230
 do_sendfile+0x535/0x7d0 fs/read_write.c:1370
 __do_sys_sendfile64 fs/read_write.c:1431 [inline]
 __se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1417
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa2e459aeb9
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:00007fa2e545e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fa2e4816090 RCX: 00007fa2e459aeb9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000005
RBP: 00007fa2e4608c1f R08: 0000000000000000 R09: 0000000000000000
R10: 000000007ffff004 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa2e4816128 R14: 00007fa2e4816090 R15: 00007ffd983bf5e8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x92c pfn:0x12eea
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea00002e7f08 ffffea00004b8488 0000000000000000
raw: 000000000000092c 0000000000000001 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x148c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_MOVABLE|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 5323, tgid 5322 (syz.0.0), ts 85673831826, free_ts 85960194399
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884
 prep_new_page mm/page_alloc.c:1892 [inline]
 get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3945
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5240
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
 alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline]
 alloc_pages_noprof+0xa8/0x190 mm/mempolicy.c:2577
 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2587
 filemap_alloc_folio_noprof+0x111/0x470 mm/filemap.c:1013
 __filemap_get_folio_mpol+0x3fc/0xb00 mm/filemap.c:2006
 __filemap_get_folio include/linux/pagemap.h:774 [inline]
 gfs2_getbuf+0x186/0x6d0 fs/gfs2/meta_io.c:144
 gfs2_meta_new+0x31/0x160 fs/gfs2/meta_io.c:196
 init_dinode+0x75/0xa70 fs/gfs2/inode.c:580
 gfs2_create_inode+0x115a/0x1630 fs/gfs2/inode.c:863
 gfs2_atomic_open+0x116/0x200 fs/gfs2/inode.c:1402
 atomic_open fs/namei.c:4304 [inline]
 lookup_open fs/namei.c:4415 [inline]
 open_last_lookups fs/namei.c:4549 [inline]
 path_openat+0x121a/0x3e20 fs/namei.c:4793
 do_filp_open+0x22d/0x490 fs/namei.c:4823
 do_sys_openat2+0x12f/0x220 fs/open.c:1430
page last free pid 73 tgid 73 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1433 [inline]
 free_unref_folios+0xdce/0x1510 mm/page_alloc.c:3030
 shrink_folio_list+0x4930/0x5160 mm/vmscan.c:1603
 evict_folios+0x4795/0x5880 mm/vmscan.c:4711
 try_to_shrink_lruvec+0x88b/0xb20 mm/vmscan.c:4874
 shrink_one+0x25c/0x710 mm/vmscan.c:4919
 shrink_many mm/vmscan.c:4982 [inline]
 lru_gen_shrink_node mm/vmscan.c:5060 [inline]
 shrink_node+0x2f8b/0x35f0 mm/vmscan.c:6047
 kswapd_shrink_node mm/vmscan.c:6901 [inline]
 balance_pgdat mm/vmscan.c:7084 [inline]
 kswapd+0x144c/0x2800 mm/vmscan.c:7354
 kthread+0x726/0x8b0 kernel/kthread.c:463
 ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Memory state around the buggy address:
 ffff888012eea780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888012eea800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888012eea880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                          ^
 ffff888012eea900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888012eea980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/28 04:45 upstream 1f97d9dcf536 3029c699 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2026/01/17 12:08 upstream 54e82e93ca93 d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2026/01/13 16:31 upstream 54e82e93ca93 d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2026/01/04 23:52 upstream 54e82e93ca93 d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2025/12/15 10:43 upstream 8f0b4cce4481 d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2025/12/08 08:45 upstream c2f2b01b74be d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2025/11/16 08:51 upstream f824272b6e3f f7988ea4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2025/11/15 22:16 upstream f824272b6e3f f7988ea4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
2025/11/08 18:36 upstream e811c33b1f13 4e1406b4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: use-after-free Read in iomap_read_inline_data
* Struck through repros no longer work on HEAD.