================================================================== BUG: KASAN: use-after-free in crc16+0x1ce/0x2a0 lib/crc16.c:58 Read of size 1 at addr ffff88816b0e4000 by task syz-executor.2/14581 CPU: 0 PID: 14581 Comm: syz-executor.2 Not tainted 5.15.98-syzkaller-00348-g7364b7abbafb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 crc16+0x1ce/0x2a0 lib/crc16.c:58 ext4_group_desc_csum+0x882/0xb90 fs/ext4/super.c:2840 ext4_group_desc_csum_set+0x1d8/0x270 fs/ext4/super.c:2863 ext4_mb_mark_diskspace_used+0xbc3/0x1350 fs/ext4/mballoc.c:3861 ext4_mb_new_blocks+0x1286/0x43f0 fs/ext4/mballoc.c:5641 ext4_ext_map_blocks+0x1a0d/0x7250 fs/ext4/extents.c:4287 ext4_map_blocks+0xaa7/0x1e30 fs/ext4/inode.c:646 ext4_iomap_alloc fs/ext4/inode.c:3427 [inline] ext4_iomap_begin+0x824/0xd10 fs/ext4/inode.c:3477 iomap_iter+0x5b5/0xbe0 fs/iomap/iter.c:74 __iomap_dio_rw+0xb3a/0x1ed0 fs/iomap/direct-io.c:593 iomap_dio_rw+0x3e/0x90 fs/iomap/direct-io.c:680 ext4_dio_write_iter fs/ext4/file.c:576 [inline] ext4_file_write_iter+0x1142/0x1cc0 fs/ext4/file.c:687 call_write_iter include/linux/fs.h:2157 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0xd8a/0x1160 fs/read_write.c:594 ksys_write+0x199/0x2c0 fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:656 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f4994e0d0f9 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:00007f4993b80168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4994f2cf80 RCX: 00007f4994e0d0f9 RDX: 0000000000000007 RSI: 0000000020000040 RDI: 0000000000000004 RBP: 00007f4994e68b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd4ad9e1cf R14: 00007f4993b80300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea0005ac3900 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x16b0e4 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea000466e808 ffffea000429b708 0000000000000000 raw: 0000000000000000 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x100cc0(GFP_USER), pid 21442, ts 513228101296, free_ts 514317198477 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2502 prep_new_page mm/page_alloc.c:2508 [inline] get_page_from_freelist+0x2c14/0x2cf0 mm/page_alloc.c:4291 __alloc_pages+0x386/0x7b0 mm/page_alloc.c:5569 __alloc_pages_node include/linux/gfp.h:591 [inline] alloc_pages_node include/linux/gfp.h:605 [inline] alloc_pages include/linux/gfp.h:618 [inline] __get_free_pages+0xe/0x30 mm/page_alloc.c:5606 kasan_populate_vmalloc_pte+0x39/0x130 mm/kasan/shadow.c:266 apply_to_pte_range mm/memory.c:2604 [inline] apply_to_pmd_range mm/memory.c:2648 [inline] apply_to_pud_range mm/memory.c:2684 [inline] apply_to_p4d_range mm/memory.c:2720 [inline] __apply_to_page_range+0x8dd/0xbe0 mm/memory.c:2754 apply_to_page_range+0x3b/0x50 mm/memory.c:2773 kasan_populate_vmalloc+0x65/0x70 mm/kasan/shadow.c:297 alloc_vmap_area+0x192f/0x1a80 mm/vmalloc.c:1576 __get_vm_area_node+0x158/0x360 mm/vmalloc.c:2439 __vmalloc_node_range+0xdf/0x7d0 mm/vmalloc.c:3045 alloc_thread_stack_node kernel/fork.c:254 [inline] dup_task_struct+0x416/0xc60 kernel/fork.c:936 copy_process+0x5c4/0x3260 kernel/fork.c:2086 create_io_thread+0x16c/0x1e0 kernel/fork.c:2607 create_io_worker+0x1e6/0x5a0 io_uring/io-wq.c:821 io_wqe_create_worker io_uring/io-wq.c:301 [inline] io_wqe_enqueue+0x743/0xa80 io_uring/io-wq.c:934 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1370 [inline] free_pcp_prepare mm/page_alloc.c:1442 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3441 free_unref_page+0xac/0x2c0 mm/page_alloc.c:3521 free_the_page mm/page_alloc.c:711 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5645 free_pages+0x7c/0x90 mm/page_alloc.c:5656 kasan_depopulate_vmalloc_pte+0x6a/0x90 mm/kasan/shadow.c:354 apply_to_pte_range mm/memory.c:2604 [inline] apply_to_pmd_range mm/memory.c:2648 [inline] apply_to_pud_range mm/memory.c:2684 [inline] apply_to_p4d_range mm/memory.c:2720 [inline] __apply_to_page_range+0x8dd/0xbe0 mm/memory.c:2754 apply_to_existing_page_range+0x38/0x50 mm/memory.c:2787 kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:464 __purge_vmap_area_lazy+0x154a/0x1690 mm/vmalloc.c:1715 _vm_unmap_aliases+0x339/0x3b0 mm/vmalloc.c:2118 vm_unmap_aliases+0x19/0x20 mm/vmalloc.c:2141 change_page_attr_set_clr+0x308/0x1050 arch/x86/mm/pat/set_memory.c:1740 change_page_attr_clear arch/x86/mm/pat/set_memory.c:1797 [inline] set_memory_ro+0xa1/0xe0 arch/x86/mm/pat/set_memory.c:1943 bpf_jit_binary_lock_ro include/linux/filter.h:888 [inline] bpf_int_jit_compile+0xbf42/0xc6d0 arch/x86/net/bpf_jit_comp.c:2372 bpf_prog_select_runtime+0x706/0x9e0 kernel/bpf/core.c:1926 bpf_prog_load+0x1315/0x1b50 kernel/bpf/syscall.c:2331 Memory state around the buggy address: ffff88816b0e3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88816b0e3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88816b0e4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88816b0e4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88816b0e4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================