Hello,
syzbot found the following issue on:
HEAD commit: 8f0b4cce4481 Linux 6.19-rc1
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=169acd92580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=513255d80ab78f2b
dashboard link:
https://syzkaller.appspot.com/bug?extid=365d799c2cc252b698e4
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable):
https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-8f0b4cce.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/7b037b4b8714/vmlinux-8f0b4cce.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/31c24c278e15/bzImage-8f0b4cce.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+365d79...@syzkaller.appspotmail.com
loop0: detected capacity change from 0 to 32768
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS (format 1801)...
gfs2: fsid=syz:syz.0: journal 0 mapped with 1 extents in 0ms
gfs2: fsid=syz:syz.0: first mount done, others may mount
==================================================================
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 159 at addr ffff88801e8298e8 by task syz.0.0/5336
CPU: 0 UID: 0 PID: 5336 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~bpo12+1 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x2b0/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:898 [inline]
iomap_write_begin+0xcdd/0x1270 fs/iomap/buffered-io.c:975
iomap_write_iter fs/iomap/buffered-io.c:1107 [inline]
iomap_file_buffered_write+0x45f/0x9c0 fs/iomap/buffered-io.c:1188
gfs2_file_buffered_write+0x4ed/0x880 fs/gfs2/file.c:1061
gfs2_file_write_iter+0x94e/0x1100 fs/gfs2/file.c:1166
iter_file_splice_write+0x972/0x10b0 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+0x5a8/0xcc0 fs/splice.c:1105
do_splice_direct_actor fs/splice.c:1204 [inline]
do_splice_direct+0x181/0x270 fs/splice.c:1230
do_sendfile+0x4da/0x7e0 fs/read_write.c:1370
__do_sys_sendfile64 fs/read_write.c:1431 [inline]
__se_sys_sendfile64+0x13e/0x190 fs/read_write.c:1417
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9c8bf8f7c9
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:00007f9c8ce68038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f9c8c1e5fa0 RCX: 00007f9c8bf8f7c9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000008
RBP: 00007f9c8c013f91 R08: 0000000000000000 R09: 0000000000000000
R10: 000000007ffff000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9c8c1e6038 R14: 00007f9c8c1e5fa0 R15: 00007ffdb62719d8
</TASK>
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x92c pfn:0x1e829
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea00007a2288 ffffea00007f1cc8 0000000000000000
raw: 000000000000092c 0000000000000000 00000000ffffffff 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 5336, tgid 5335 (syz.0.0), ts 75696329519, free_ts 76469625595
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2577
folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2587
filemap_alloc_folio_noprof+0x112/0x490 mm/filemap.c:1013
__filemap_get_folio_mpol+0x3fc/0xb00 mm/filemap.c:2006
__filemap_get_folio include/linux/pagemap.h:763 [inline]
gfs2_getbuf+0x181/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+0x10d6/0x15b0 fs/gfs2/inode.c:863
gfs2_atomic_open+0x116/0x200 fs/gfs2/inode.c:1402
atomic_open fs/namei.c:4295 [inline]
lookup_open fs/namei.c:4406 [inline]
open_last_lookups fs/namei.c:4540 [inline]
path_openat+0x11f8/0x3dd0 fs/namei.c:4784
do_filp_open+0x1fa/0x410 fs/namei.c:4814
do_sys_openat2+0x121/0x200 fs/open.c:1430
page last free pid 78 tgid 78 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
free_unref_folios+0xdb3/0x14f0 mm/page_alloc.c:3000
shrink_folio_list+0x4800/0x5010 mm/vmscan.c:1603
evict_folios+0x473e/0x57f0 mm/vmscan.c:4711
try_to_shrink_lruvec+0x8a3/0xb50 mm/vmscan.c:4874
shrink_one+0x25c/0x720 mm/vmscan.c:4919
shrink_many mm/vmscan.c:4982 [inline]
lru_gen_shrink_node mm/vmscan.c:5060 [inline]
shrink_node+0x2f7d/0x35b0 mm/vmscan.c:6047
kswapd_shrink_node mm/vmscan.c:6901 [inline]
balance_pgdat mm/vmscan.c:7084 [inline]
kswapd+0x145a/0x2820 mm/vmscan.c:7354
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x599/0xb30 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:
ffff88801e829780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88801e829800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88801e829880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88801e829900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88801e829980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
---
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