================================================================== 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 ffff8880616bdf00 by task syz.3.202/5036 CPU: 0 PID: 5036 Comm: syz.3.202 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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+0x665/0xc50 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:956 splice_direct_to_actor+0x4de/0xbd0 fs/splice.c:902 do_splice_direct+0x1b6/0x2c0 fs/splice.c:1008 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:0x7f6cea5c86c9 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:00007f6ce882f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f6cea81efa0 RCX: 00007f6cea5c86c9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004 RBP: 00007f6cea64af91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020fffe82 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f6cea81f038 R14: 00007f6cea81efa0 R15: 00007ffe263eefd8 Allocated by task 5036: 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:647 [inline] kcalloc include/linux/slab.h:676 [inline] iter_file_splice_write+0x185/0xc50 fs/splice.c:628 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:956 splice_direct_to_actor+0x4de/0xbd0 fs/splice.c:902 do_splice_direct+0x1b6/0x2c0 fs/splice.c:1008 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:3011 [inline] call_rcu+0x182/0x930 kernel/rcu/tree.c:3091 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:2781 __rtnl_newlink net/core/rtnetlink.c:3452 [inline] rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3574 rtnetlink_rcv_msg+0x7ff/0xe90 net/core/rtnetlink.c:5684 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2507 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] __sys_sendto+0x423/0x580 net/socket.c:2073 __do_sys_sendto net/socket.c:2085 [inline] __se_sys_sendto net/socket.c:2081 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2081 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 ffff8880616bde00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff8880616bde00, ffff8880616bdf00) The buggy address belongs to the page: page:ffffea000185af00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x616bc head:ffffea000185af00 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 0000000100000001 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4181, ts 58652328493, free_ts 12181978110 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:5487 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_slab_page mm/slub.c:1782 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xb6/0x4b0 mm/slub.c:1980 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] __kmalloc_node+0x200/0x3b0 mm/slub.c:4456 kmalloc_array_node include/linux/slab.h:700 [inline] kcalloc_node include/linux/slab.h:705 [inline] memcg_alloc_page_obj_cgroups+0x81/0x120 mm/memcontrol.c:2839 memcg_slab_post_alloc_hook mm/slab.h:313 [inline] slab_post_alloc_hook+0xba/0x380 mm/slab.h:526 slab_alloc_node mm/slub.c:3225 [inline] __kmalloc_node+0x15a/0x3b0 mm/slub.c:4456 kmalloc_node include/linux/slab.h:630 [inline] kvmalloc_node+0x84/0x130 mm/util.c:619 kvmalloc include/linux/mm.h:816 [inline] alloc_fdtable+0x169/0x2c0 fs/file.c:156 dup_fd+0x97c/0xc70 fs/file.c:346 copy_files+0x72/0xe0 kernel/fork.c:1564 copy_process+0x1680/0x3e00 kernel/fork.c:2278 kernel_clone+0x219/0x930 kernel/fork.c:2679 __do_sys_clone kernel/fork.c:2796 [inline] __se_sys_clone kernel/fork.c:2780 [inline] __x64_sys_clone+0x170/0x1c0 kernel/fork.c:2780 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 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:9406 destroy_args+0x100/0xa20 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x318/0x370 mm/debug_vm_pgtable.c:1336 do_one_initcall+0x1ee/0x680 init/main.c:1316 do_initcall_level+0x137/0x1f0 init/main.c:1389 do_initcalls+0x4b/0x90 init/main.c:1405 kernel_init_freeable+0x3ce/0x560 init/main.c:1629 kernel_init+0x19/0x1b0 init/main.c:1520 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff8880616bde00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880616bde80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880616bdf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880616bdf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880616be000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================