==================================================================
BUG: KASAN: slab-use-after-free in dtSplitPage+0x1bce/0x36a0
Write of size 1 at addr ffff8881bcd02000 by task syz.0.55/5947

CPU: 1 UID: 0 PID: 5947 Comm: syz.0.55 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 dtSplitPage+0x1bce/0x36a0
 dtInsert+0x1080/0x5cb0
 jfs_rename+0x89d/0x1870
 vfs_rename+0xbd9/0xef0
 filename_renameat2+0x533/0x9a0
 __se_sys_rename+0x55/0x2c0
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f86a699e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f86a7825028 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f86a6c25fa0 RCX: 00007f86a699e0d9
RDX: 0000000000000000 RSI: 0000200000000f40 RDI: 00002000000003c0
RBP: 00007f86a6a35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f86a6c26038 R14: 00007f86a6c25fa0 R15: 00007ffddb2a6438
 </TASK>

Allocated by task 5763:
 kasan_save_track+0x3e/0x80
 __kasan_slab_alloc+0x6c/0x80
 kmem_cache_alloc_noprof+0x2a0/0x5f0
 xfs_buf_item_init+0x6a/0x6e0
 _xfs_trans_bjoin+0x46/0x110
 xfs_trans_read_buf_map+0x2ee/0x820
 xfs_alloc_read_agfl+0x22c/0x440
 xfs_alloc_fix_freelist+0x1183/0x1c60
 xfs_free_extent_fix_freelist+0x169/0x280
 xfs_rmap_finish_init_cursor+0xb4/0x1f0
 xfs_rmap_finish_one+0x2bd/0x8d0
 xfs_rmap_update_finish_item+0x25/0x40
 xfs_defer_finish_one+0x5ef/0xd60
 xfs_defer_finish_noroll+0x914/0x1320
 xfs_trans_commit+0x10b/0x1c0
 xfs_iomap_write_direct+0x483/0x6a0
 xfs_direct_write_iomap_begin+0x100a/0x1450
 iomap_iter+0x5f5/0xf80
 __iomap_dio_rw+0xcab/0x1de0
 iomap_dio_rw+0x45/0xb0
 xfs_file_dio_write_aligned+0x39d/0x470
 xfs_file_write_iter+0x7e8/0x930
 iter_file_splice_write+0xa31/0x1240
 direct_splice_actor+0x101/0x160
 splice_direct_to_actor+0x57b/0xcb0
 do_splice_direct+0x195/0x290
 do_sendfile+0x52e/0x7c0
 __se_sys_sendfile64+0x144/0x1a0
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 5763:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kmem_cache_free+0x182/0x650
 xfs_trans_brelse+0x1ce/0x3e0
 xfs_alloc_fix_freelist+0x1432/0x1c60
 xfs_free_extent_fix_freelist+0x169/0x280
 xfs_rmap_finish_init_cursor+0xb4/0x1f0
 xfs_rmap_finish_one+0x2bd/0x8d0
 xfs_rmap_update_finish_item+0x25/0x40
 xfs_defer_finish_one+0x5ef/0xd60
 xfs_defer_finish_noroll+0x914/0x1320
 xfs_trans_commit+0x10b/0x1c0
 xfs_iomap_write_direct+0x483/0x6a0
 xfs_direct_write_iomap_begin+0x100a/0x1450
 iomap_iter+0x5f5/0xf80
 __iomap_dio_rw+0xcab/0x1de0
 iomap_dio_rw+0x45/0xb0
 xfs_file_dio_write_aligned+0x39d/0x470
 xfs_file_write_iter+0x7e8/0x930
 iter_file_splice_write+0xa31/0x1240
 direct_splice_actor+0x101/0x160
 splice_direct_to_actor+0x57b/0xcb0
 do_splice_direct+0x195/0x290
 do_sendfile+0x52e/0x7c0
 __se_sys_sendfile64+0x144/0x1a0
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8881bcd02000
 which belongs to the cache xfs_buf_item of size 272
The buggy address is located 0 bytes inside of
 freed 272-byte region [ffff8881bcd02000, ffff8881bcd02110)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8881bcd02000 pfn:0x1bcd02
flags: 0x57ff00000000200(workingset|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000200 ffff888104af6140 ffffea0005bdccd0 ffffea0006e82fd0
raw: ffff8881bcd02000 00000008000c0004 00000000f5000000 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 0xd2c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5763, tgid 5721 (syz.2.7), ts 62543477961, free_ts 62520991467
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x21fa/0x2270
 __alloc_frozen_pages_noprof+0x18d/0x380
 allocate_slab+0x79/0x5e0
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2bf/0x6b0
 kmem_cache_alloc_noprof+0x382/0x5f0
 xfs_buf_item_init+0x6a/0x6e0
 _xfs_trans_bjoin+0x46/0x110
 xfs_trans_read_buf_map+0x2ee/0x820
 xfs_alloc_read_agfl+0x22c/0x440
 xfs_alloc_fix_freelist+0x1183/0x1c60
 xfs_alloc_vextent_prepare_ag+0xda/0x650
 xfs_alloc_vextent_near_bno+0x296/0x570
 xfs_bmapi_allocate+0x1b7d/0x2f20
 xfs_bmapi_write+0x843/0x1330
page last free pid 23 tgid 23 stack trace:
 __free_frozen_pages+0xc1e/0xd10
 tlb_remove_table_rcu+0x85/0x100
 rcu_core+0x78b/0x10a0
 handle_softirqs+0x225/0x840
 run_ksoftirqd+0x36/0x60
 smpboot_thread_fn+0x57c/0xa80
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff8881bcd01f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881bcd01f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881bcd02000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8881bcd02080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881bcd02100: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb
==================================================================
