XFS (loop3): Ending clean mount XFS (loop3): Quotacheck needed: Please wait. XFS (loop3): Quotacheck: Done. ================================================================== BUG: KASAN: slab-out-of-bounds in xfs_getbmap+0x1c06/0x1c90 fs/xfs/xfs_bmap_util.c:561 Read of size 4 at addr ffff88807d36fe78 by task syz-executor.3/17280 CPU: 0 PID: 17280 Comm: syz-executor.3 Not tainted 6.3.0-syzkaller-12049-g58390c8ce1bd #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:0x7f2490c8c169 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:00007f2491902168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2490dabf80 RCX: 00007f2490c8c169 RDX: 0000000020000140 RSI: 00000000c0205826 RDI: 0000000000000006 RBP: 00007f2490ce7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc7c9fd3af R14: 00007f2491902300 R15: 0000000000022000 Allocated by task 17280: 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 include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:680 [inline] ima_alloc_init_template+0x8b/0x6d0 security/integrity/ima/ima_api.c:51 ima_store_measurement+0x289/0x6f0 security/integrity/ima/ima_api.c:368 process_measurement+0x11b9/0x1ce0 security/integrity/ima/ima_main.c:349 ima_file_check+0xf1/0x170 security/integrity/ima/ima_main.c:539 do_open fs/namei.c:3638 [inline] path_openat+0x280a/0x3170 fs/namei.c:3791 do_filp_open+0x234/0x490 fs/namei.c:3818 do_sys_openat2+0x13f/0x500 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1383 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 ffff88807d36fe00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 56 bytes to the right of allocated 64-byte region [ffff88807d36fe00, ffff88807d36fe40) The buggy address belongs to the physical page: page:ffffea0001f4dbc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d36f ksm flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888012441640 ffffea0001b778c0 dead000000000003 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 7983, tgid 7983 (syz-executor.0), ts 354926264387, free_ts 345858208290 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 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] add_block_entry+0x5f/0x520 fs/btrfs/ref-verify.c:270 btrfs_ref_tree_mod+0x55a/0x1510 fs/btrfs/ref-verify.c:735 btrfs_alloc_tree_block+0xf41/0x1800 fs/btrfs/extent-tree.c:4928 __btrfs_cow_block+0x470/0x1830 fs/btrfs/ctree.c:541 btrfs_cow_block+0x403/0x780 fs/btrfs/ctree.c:696 btrfs_search_slot+0xbfc/0x2f50 fs/btrfs/ctree.c:2144 btrfs_update_root+0xf2/0xc80 fs/btrfs/root-tree.c:137 update_cowonly_root fs/btrfs/transaction.c:1239 [inline] commit_cowonly_roots+0x5b7/0x850 fs/btrfs/transaction.c:1306 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2555 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2696 release_pages+0x2193/0x2470 mm/swap.c:1042 __pagevec_release+0x84/0x100 mm/swap.c:1062 pagevec_release include/linux/pagevec.h:63 [inline] folio_batch_release include/linux/pagevec.h:132 [inline] invalidate_mapping_pagevec+0x515/0x640 mm/truncate.c:537 btrfs_close_bdev fs/btrfs/volumes.c:1102 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1126 [inline] close_fs_devices+0x41d/0x870 fs/btrfs/volumes.c:1168 btrfs_close_devices+0xc8/0x5c0 fs/btrfs/volumes.c:1183 close_ctree+0x738/0xc60 fs/btrfs/disk-io.c:4644 generic_shutdown_super+0x134/0x340 fs/super.c:500 kill_anon_super+0x3b/0x60 fs/super.c:1107 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2134 deactivate_locked_super+0xa4/0x110 fs/super.c:331 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1177 task_work_run+0x24a/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 Memory state around the buggy address: ffff88807d36fd00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88807d36fd80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff88807d36fe00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff88807d36fe80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88807d36ff00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================