================================================================== 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 ffff888060559100 by task syz.1.32/4380 CPU: 1 PID: 4380 Comm: syz.1.32 Not tainted 5.15.185-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:0x7fe08b40f929 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:00007fe089277038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fe08b636fa0 RCX: 00007fe08b40f929 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000007 RBP: 00007fe08b491b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000fffe82 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fe08b636fa0 R15: 00007ffc7e967958 Allocated by task 4380: 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 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x179/0x920 kernel/rcu/tree.c:3087 fib_create_info+0x196e/0x24f0 net/ipv4/fib_semantics.c:1608 fib_table_insert+0xe4/0x1b20 net/ipv4/fib_trie.c:1212 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1106 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1128 fib_netdev_event+0x35c/0x480 net/ipv4/fib_frontend.c:1488 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929 do_setlink+0xc01/0x3980 net/core/rtnetlink.c:2779 __rtnl_newlink net/core/rtnetlink.c:3450 [inline] rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x423/0x580 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2071 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 ffff888060559000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff888060559000, ffff888060559100) The buggy address belongs to the page: page:ffffea0001815600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x60558 head:ffffea0001815600 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001815580 0000000400000004 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4169, ts 62854913528, free_ts 20553999302 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] __kmalloc+0x1cd/0x330 mm/slub.c:4403 kmalloc include/linux/slab.h:609 [inline] kzalloc include/linux/slab.h:735 [inline] fib_create_info+0xabc/0x24f0 net/ipv4/fib_semantics.c:1478 fib_table_insert+0xe4/0x1b20 net/ipv4/fib_trie.c:1212 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1106 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1128 fib_netdev_event+0x35c/0x480 net/ipv4/fib_frontend.c:1488 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929 do_setlink+0xc01/0x3980 net/core/rtnetlink.c:2779 __rtnl_newlink net/core/rtnetlink.c:3450 [inline] rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 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 free_contig_range+0x96/0xf0 mm/page_alloc.c:9393 destroy_args+0xef/0x8b0 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x318/0x370 mm/debug_vm_pgtable.c:1331 do_one_initcall+0x1ee/0x680 init/main.c:1302 do_initcall_level+0x137/0x1f0 init/main.c:1375 do_initcalls+0x4b/0x90 init/main.c:1391 kernel_init_freeable+0x3ce/0x560 init/main.c:1615 kernel_init+0x19/0x1b0 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff888060559000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888060559080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888060559100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888060559180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888060559200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================