================================================================== BUG: KASAN: slab-out-of-bounds in xfs_getbmap+0x1c06/0x1c90 fs/xfs/xfs_bmap_util.c:561 Read of size 4 at addr ffff88803218bff8 by task syz-executor.5/22237 CPU: 1 PID: 22237 Comm: syz-executor.5 Not tainted 6.3.0-syzkaller-12378-gc8c655c34e33 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 xfs_getbmap+0x1c06/0x1c90 fs/xfs/xfs_bmap_util.c:561 xfs_ioc_getbmap+0x243/0x7a0 fs/xfs/xfs_ioctl.c:1481 xfs_file_ioctl+0xbf5/0x16a0 fs/xfs/xfs_ioctl.c:1949 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fb56248c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb563275168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fb5625ac120 RCX: 00007fb56248c169 RDX: 0000000020000140 RSI: 00000000c0205826 RDI: 0000000000000007 RBP: 00007fb5624e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff892635ef R14: 00007fb563275300 R15: 0000000000022000 Allocated by task 5048: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:979 kmalloc_array include/linux/slab.h:596 [inline] kcalloc include/linux/slab.h:627 [inline] cache_create_net+0x83/0x270 net/sunrpc/cache.c:1749 rsc_cache_create_net net/sunrpc/auth_gss/svcauth_gss.c:2065 [inline] gss_svc_init_net+0x58/0x580 net/sunrpc/auth_gss/svcauth_gss.c:2093 ops_init+0x351/0x600 net/core/net_namespace.c:136 setup_net+0x4b9/0xb90 net/core/net_namespace.c:339 copy_net_ns+0x4cb/0x790 net/core/net_namespace.c:491 create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x122/0x170 kernel/nsproxy.c:228 ksys_unshare+0x584/0xb20 kernel/fork.c:3444 __do_sys_unshare kernel/fork.c:3515 [inline] __se_sys_unshare kernel/fork.c:3513 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3513 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888032188000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 8184 bytes to the right of allocated 8192-byte region [ffff888032188000, ffff88803218a000) The buggy address belongs to the physical page: page:ffffea0000c86200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x32188 head:ffffea0000c86200 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012442280 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080020002 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5048, tgid 5048 (syz-executor.5), ts 316974594919, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1722 prep_new_page mm/page_alloc.c:1729 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3493 __alloc_pages+0x255/0x670 mm/page_alloc.c:4759 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x1b8/0x290 mm/slub.c:3490 __do_kmalloc_node mm/slab_common.c:965 [inline] __kmalloc+0xa8/0x230 mm/slab_common.c:979 kmalloc_array include/linux/slab.h:596 [inline] kcalloc include/linux/slab.h:627 [inline] cache_create_net+0x83/0x270 net/sunrpc/cache.c:1749 rsc_cache_create_net net/sunrpc/auth_gss/svcauth_gss.c:2065 [inline] gss_svc_init_net+0x58/0x580 net/sunrpc/auth_gss/svcauth_gss.c:2093 ops_init+0x351/0x600 net/core/net_namespace.c:136 setup_net+0x4b9/0xb90 net/core/net_namespace.c:339 copy_net_ns+0x4cb/0x790 net/core/net_namespace.c:491 create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x122/0x170 kernel/nsproxy.c:228 ksys_unshare+0x584/0xb20 kernel/fork.c:3444 page_owner free stack trace missing Memory state around the buggy address: ffff88803218be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803218bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803218bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803218c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803218c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================