================================================================== BUG: KASAN: use-after-free in crc16+0x235/0x2d0 lib/crc16.c:58 Read of size 1 at addr ffff888116955000 by task syz-executor.2/4632 CPU: 0 PID: 4632 Comm: syz-executor.2 Not tainted 5.10.161-syzkaller-00019-g416c4356f372 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3c0 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x1a4/0x1f0 mm/kasan/report.c:436 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 crc16+0x235/0x2d0 lib/crc16.c:58 ext4_group_desc_csum+0x851/0xb50 fs/ext4/super.c:2850 ext4_group_desc_csum_set+0x1d6/0x270 fs/ext4/super.c:2873 ext4_free_blocks+0x1b9e/0x2ad0 fs/ext4/mballoc.c:5527 ext4_remove_blocks+0xaf1/0x1180 fs/ext4/extents.c:2520 ext4_ext_rm_leaf+0xaa8/0x18c0 fs/ext4/extents.c:2704 ext4_ext_remove_space+0xf25/0x22a0 fs/ext4/extents.c:2952 ext4_ext_truncate+0x18a/0x210 fs/ext4/extents.c:4413 ext4_truncate+0xba0/0x1270 fs/ext4/inode.c:4356 ext4_evict_inode+0xf1e/0x1730 fs/ext4/inode.c:288 evict+0x2a3/0x6c0 fs/inode.c:577 iput_final fs/inode.c:1655 [inline] iput+0x61f/0x7d0 fs/inode.c:1681 do_unlinkat+0x51a/0x920 fs/namei.c:3982 __do_sys_unlink fs/namei.c:4022 [inline] __se_sys_unlink fs/namei.c:4020 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4020 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f5c608080f9 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:00007f5c5f57b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007f5c60927f80 RCX: 00007f5c608080f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007f5c60863ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffe5b703bf R14: 00007f5c5f57b300 R15: 0000000000022000 Allocated by task 390: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:428 [inline] __kasan_slab_alloc+0xb2/0xe0 mm/kasan/common.c:461 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook include/../mm/slab.h:583 [inline] slab_alloc_node mm/slub.c:2956 [inline] slab_alloc mm/slub.c:2964 [inline] kmem_cache_alloc+0x16c/0x300 mm/slub.c:2969 kmem_cache_zalloc include/linux/slab.h:654 [inline] lsm_inode_alloc security/security.c:556 [inline] security_inode_alloc+0x29/0x140 security/security.c:952 inode_init_always+0x710/0x970 fs/inode.c:204 alloc_inode fs/inode.c:240 [inline] new_inode_pseudo+0x93/0x220 fs/inode.c:929 sock_alloc net/socket.c:574 [inline] __sock_create+0x136/0x770 net/socket.c:1381 sock_create net/socket.c:1468 [inline] __sys_socket+0x133/0x370 net/socket.c:1510 __do_sys_socket net/socket.c:1519 [inline] __se_sys_socket net/socket.c:1517 [inline] __x64_sys_socket+0x7a/0x90 net/socket.c:1517 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Freed by task 3154: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:357 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:360 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1604 [inline] slab_free_freelist_hook+0xcc/0x1a0 mm/slub.c:1630 slab_free mm/slub.c:3212 [inline] kmem_cache_free+0xa9/0x1f0 mm/slub.c:3228 inode_free_by_rcu+0x1c/0x20 security/security.c:967 rcu_do_batch+0x59e/0xc40 kernel/rcu/tree.c:2485 rcu_core+0x59b/0xe30 kernel/rcu/tree.c:2726 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2739 __do_softirq+0x27e/0x596 kernel/softirq.c:305 Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xca/0xf0 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:2967 [inline] call_rcu+0x140/0x1300 kernel/rcu/tree.c:3041 security_inode_free+0xb4/0xd0 security/security.c:984 __destroy_inode+0x179/0x500 fs/inode.c:258 destroy_inode fs/inode.c:281 [inline] evict+0x59f/0x6c0 fs/inode.c:594 iput_final fs/inode.c:1655 [inline] iput+0x61f/0x7d0 fs/inode.c:1681 dentry_unlink_inode+0x2df/0x3d0 fs/dcache.c:374 __dentry_kill+0x3e2/0x5d0 fs/dcache.c:579 dentry_kill+0xc0/0x2a0 fs/dcache.c:692 dput+0x175/0x320 fs/dcache.c:878 __fput+0x540/0x7c0 fs/file_table.c:294 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x147/0x1b0 kernel/task_work.c:154 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xc8/0xe0 kernel/entry/common.c:164 exit_to_user_mode_prepare kernel/entry/common.c:191 [inline] syscall_exit_to_user_mode+0x77/0xa0 kernel/entry/common.c:266 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Second to last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xca/0xf0 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:2967 [inline] call_rcu+0x140/0x1300 kernel/rcu/tree.c:3041 security_inode_free+0xb4/0xd0 security/security.c:984 __destroy_inode+0x179/0x500 fs/inode.c:258 destroy_inode fs/inode.c:281 [inline] evict+0x59f/0x6c0 fs/inode.c:594 iput_final fs/inode.c:1655 [inline] iput+0x61f/0x7d0 fs/inode.c:1681 dentry_unlink_inode+0x2df/0x3d0 fs/dcache.c:374 __dentry_kill+0x3e2/0x5d0 fs/dcache.c:579 dentry_kill+0xc0/0x2a0 fs/dcache.c:692 dput+0x175/0x320 fs/dcache.c:878 __fput+0x540/0x7c0 fs/file_table.c:294 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x147/0x1b0 kernel/task_work.c:154 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xc8/0xe0 kernel/entry/common.c:164 exit_to_user_mode_prepare kernel/entry/common.c:191 [inline] syscall_exit_to_user_mode+0x77/0xa0 kernel/entry/common.c:266 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The buggy address belongs to the object at ffff888116955000 which belongs to the cache lsm_inode_cache of size 56 The buggy address is located 0 bytes inside of 56-byte region [ffff888116955000, ffff888116955038) The buggy address belongs to the page: page:ffffea00045a5540 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116955 flags: 0x8000000000000200(slab) raw: 8000000000000200 ffffea0004415a40 0000001100000011 ffff88810017d200 raw: 0000000000000000 00000000002e002e 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 376, ts 384347343654, free_ts 384285341817 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2386 [inline] prep_new_page mm/page_alloc.c:2392 [inline] get_page_from_freelist+0x755/0x810 mm/page_alloc.c:4073 __alloc_pages_nodemask+0x3b6/0x890 mm/page_alloc.c:5160 alloc_slab_page mm/slub.c:1815 [inline] allocate_slab+0x78/0x540 mm/slub.c:1817 new_slab mm/slub.c:1878 [inline] new_slab_objects mm/slub.c:2636 [inline] ___slab_alloc+0x131/0x2e0 mm/slub.c:2800 __slab_alloc+0x63/0xa0 mm/slub.c:2840 slab_alloc_node mm/slub.c:2922 [inline] slab_alloc mm/slub.c:2964 [inline] kmem_cache_alloc+0x1ef/0x300 mm/slub.c:2969 kmem_cache_zalloc include/linux/slab.h:654 [inline] lsm_inode_alloc security/security.c:556 [inline] security_inode_alloc+0x29/0x140 security/security.c:952 inode_init_always+0x710/0x970 fs/inode.c:204 alloc_inode fs/inode.c:240 [inline] new_inode_pseudo+0x93/0x220 fs/inode.c:929 sock_alloc net/socket.c:574 [inline] __sock_create+0x136/0x770 net/socket.c:1381 sock_create net/socket.c:1468 [inline] __sys_socket+0x133/0x370 net/socket.c:1510 __do_sys_socket net/socket.c:1519 [inline] __se_sys_socket net/socket.c:1517 [inline] __x64_sys_socket+0x7a/0x90 net/socket.c:1517 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1332 [inline] free_pcp_prepare+0x18c/0x1c0 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3293 [inline] free_unref_page_list+0x11d/0x660 mm/page_alloc.c:3367 release_pages+0xc24/0xc60 mm/swap.c:1082 free_pages_and_swap_cache+0x97/0xb0 mm/swap_state.c:356 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu+0x8a0/0xa80 mm/mmu_gather.c:247 tlb_finish_mmu+0xd2/0x1f0 mm/mmu_gather.c:326 exit_mmap+0x319/0x5c0 mm/mmap.c:3343 __mmput+0x95/0x2c0 kernel/fork.c:1133 mmput+0x4b/0x50 kernel/fork.c:1154 exit_mm+0x5cd/0x790 kernel/exit.c:489 do_exit+0x5f2/0x2340 kernel/exit.c:800 do_group_exit+0x13a/0x300 kernel/exit.c:910 get_signal+0xe17/0x1440 kernel/signal.c:2780 arch_do_signal+0x8e/0x650 arch/x86/kernel/signal.c:805 exit_to_user_mode_loop+0xa3/0xe0 kernel/entry/common.c:161 exit_to_user_mode_prepare kernel/entry/common.c:191 [inline] syscall_exit_to_user_mode+0x77/0xa0 kernel/entry/common.c:266 Memory state around the buggy address: ffff888116954f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888116954f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888116955000: fa fb fb fb fb fb fb fc fc fc fc fa fb fb fb fb ^ ffff888116955080: fb fb fc fc fc fc fa fb fb fb fb fb fb fc fc fc ffff888116955100: fc fa fb fb fb fb fb fb fc fc fc fc fa fb fb fb ==================================================================