XFS (loop5): Quotacheck needed: Please wait. XFS (loop5): 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 ffff888023a4def8 by task syz-executor.5/11826 CPU: 0 PID: 11826 Comm: syz-executor.5 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:0x7fca64a8c169 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:00007fca658c1168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fca64babf80 RCX: 00007fca64a8c169 RDX: 0000000020000140 RSI: 00000000c0205826 RDI: 0000000000000005 RBP: 00007fca64ae7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe9d1f99ef R14: 00007fca658c1300 R15: 0000000000022000 Allocated by task 8479: 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_add_violation+0x220/0x500 security/integrity/ima/ima_api.c:150 ima_rdwr_violation_check security/integrity/ima/ima_main.c:152 [inline] process_measurement+0x683/0x1ce0 security/integrity/ima/ima_main.c:252 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_open fs/open.c:1380 [inline] __se_sys_open fs/open.c:1376 [inline] __x64_sys_open+0x225/0x270 fs/open.c:1376 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 ffff888023a4de80 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 [ffff888023a4de80, ffff888023a4dec0) The buggy address belongs to the physical page: page:ffffea00008e9340 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23a4d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888012441640 ffffea000054ab00 dead000000000004 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 7094, tgid 7087 (syz-executor.0), ts 296537074636, free_ts 296532714758 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_node+0xa7/0x230 mm/slab_common.c:973 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x72/0x180 mm/util.c:604 init_free_nid_cache fs/f2fs/node.c:3275 [inline] f2fs_build_node_manager+0x1009/0x1e40 fs/f2fs/node.c:3308 f2fs_fill_super+0x5612/0x7fa0 fs/f2fs/super.c:4390 mount_bdev+0x274/0x3a0 fs/super.c:1380 legacy_get_tree+0xef/0x190 fs/fs_context.c:610 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3039 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3568 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: ffff888023a4dd80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ffff888023a4de00: 00 00 00 00 00 00 00 06 fc fc fc fc fc fc fc fc >ffff888023a4de80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff888023a4df00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888023a4df80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================