================================================================== BUG: KASAN: slab-out-of-bounds in should_fault_in_pages fs/gfs2/file.c:785 [inline] BUG: KASAN: slab-out-of-bounds in gfs2_file_buffered_write+0x576/0x900 fs/gfs2/file.c:1070 Read of size 8 at addr ffff888068a9a500 by task syz.4.230/5237 CPU: 0 PID: 5237 Comm: syz.4.230 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 should_fault_in_pages fs/gfs2/file.c:785 [inline] gfs2_file_buffered_write+0x576/0x900 fs/gfs2/file.c:1070 gfs2_file_write_iter+0xf3b/0x11d0 fs/gfs2/file.c:1145 do_iter_readv_writev+0x497/0x600 fs/read_write.c:-1 do_iter_write+0x205/0x7b0 fs/read_write.c:855 iter_file_splice_write+0x65f/0xc40 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:936 splice_direct_to_actor+0x4dc/0xb50 fs/splice.c:891 do_splice_direct+0x1b9/0x2c0 fs/splice.c:979 do_sendfile+0x5d5/0xec0 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x13b/0x190 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f14b92a79a9 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:00007f14b710f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f14b94cefa0 RCX: 00007f14b92a79a9 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004 RBP: 00007f14b9329d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000800000009 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f14b94cefa0 R15: 00007ffd87d068f8 Allocated by task 5237: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc_array include/linux/slab.h:644 [inline] kcalloc include/linux/slab.h:673 [inline] iter_file_splice_write+0x17f/0xc40 fs/splice.c:628 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:936 splice_direct_to_actor+0x4dc/0xb50 fs/splice.c:891 do_splice_direct+0x1b9/0x2c0 fs/splice.c:979 do_sendfile+0x5d5/0xec0 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x13b/0x190 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888068a9a400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff888068a9a400, ffff888068a9a500) The buggy address belongs to the page: page:ffffea0001a2a680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x68a9a head:ffffea0001a2a680 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888016841b40 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5238, ts 180064669093, free_ts 179537489478 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc_trace+0x1a5/0x2a0 mm/slub.c:3245 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:735 [inline] gfs2_open_common+0xb8/0x2a0 fs/gfs2/file.c:642 gfs2_open+0x12f/0x1c0 fs/gfs2/file.c:692 do_dentry_open+0x7ff/0xf80 fs/open.c:826 do_open fs/namei.c:3608 [inline] path_openat+0x2682/0x2f30 fs/namei.c:3742 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769 do_sys_openat2+0x142/0x4a0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 __vunmap+0x8ab/0xa40 mm/vmalloc.c:2621 kcov_put kernel/kcov.c:417 [inline] kcov_close+0x27/0x50 kernel/kcov.c:519 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x61e/0x20a0 kernel/exit.c:883 do_group_exit+0x12e/0x300 kernel/exit.c:997 get_signal+0x6ca/0x12c0 kernel/signal.c:2900 arch_do_signal_or_restart+0xc1/0x1300 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888068a9a400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888068a9a480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888068a9a500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888068a9a580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888068a9a600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================