==================================================================
BUG: KASAN: slab-use-after-free in check_extent_overbig+0x273/0x7b0
Read of size 8 at addr ffff88812db62050 by task syz.3.2259/16497

CPU: 0 UID: 0 PID: 16497 Comm: syz.3.2259 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+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 check_extent_overbig+0x273/0x7b0
 bch2_check_extents+0x56b/0x3d20
 __bch2_run_recovery_passes+0x3bd/0x1060
 bch2_run_recovery_passes+0x184/0x210
 bch2_fs_recovery+0x2690/0x3a50
 bch2_fs_start+0xaaf/0xda0
 bch2_fs_get_tree+0xb39/0x1520
 vfs_get_tree+0x92/0x2b0
 do_new_mount+0x2a2/0x9e0
 __se_sys_mount+0x317/0x410
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0d1019038a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f0d10f7ee68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f0d10f7eef0 RCX: 00007f0d1019038a
RDX: 0000200000000080 RSI: 0000200000005900 RDI: 00007f0d10f7eeb0
RBP: 0000200000000080 R08: 00007f0d10f7eef0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000005900
R13: 00007f0d10f7eeb0 R14: 00000000000058e2 R15: 0000200000000080
 </TASK>

Allocated by task 1095:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_node_track_caller_noprof+0x271/0x4e0
 kmalloc_reserve+0x136/0x290
 __alloc_skb+0x142/0x2d0
 nsim_dev_trap_report_work+0x29a/0xb80
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

Freed by task 1095:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 kfree+0x18e/0x440
 skb_release_data+0x62d/0x7c0
 consume_skb+0x9e/0xf0
 nsim_dev_trap_report_work+0x7cf/0xb80
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff88812db62000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 80 bytes inside of
 freed 4096-byte region [ffff88812db62000, ffff88812db63000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12db60
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff88801a442140 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff88801a442140 dead000000000122 0000000000000000
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 057ff00000000003 ffffea0004b6d801 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x152800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 16515, tgid 16515 (bch-reclaim/loo), ts 555387076346, free_ts 555334846720
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x8a/0x370
 ___slab_alloc+0xbeb/0x1410
 __kvmalloc_node_noprof+0x429/0x5f0
 __bch2_btree_node_write+0x1bc0/0x41a0
 __btree_node_flush+0x323/0x430
 bch2_btree_node_flush1+0x2a/0x40
 journal_flush_pins+0x8e3/0xe90
 __bch2_journal_reclaim+0x910/0xed0
 bch2_journal_reclaim_thread+0x177/0x4f0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
page last free pid 16497 tgid 16496 stack trace:
 __free_pages_ok+0xa83/0xbe0
 free_large_kmalloc+0x13a/0x1f0
 btree_node_sort+0x117f/0x1760
 bch2_btree_post_write_cleanup+0x11f/0xad0
 bch2_btree_node_prep_for_write+0x337/0x650
 bch2_trans_lock_write+0x669/0xba0
 __bch2_trans_commit+0x2773/0x8870
 bch2_check_extents+0x2a72/0x3d20
 __bch2_run_recovery_passes+0x3bd/0x1060
 bch2_run_recovery_passes+0x184/0x210
 bch2_fs_recovery+0x2690/0x3a50
 bch2_fs_start+0xaaf/0xda0
 bch2_fs_get_tree+0xb39/0x1520
 vfs_get_tree+0x92/0x2b0
 do_new_mount+0x2a2/0x9e0
 __se_sys_mount+0x317/0x410

Memory state around the buggy address:
 ffff88812db61f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88812db61f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88812db62000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                 ^
 ffff88812db62080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88812db62100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
