sysv_free_block: flc_count > flc_size sysv_free_block: flc_count > flc_size sysv_free_block: flc_count > flc_size sysv_free_block: flc_count > flc_size ================================================================== BUG: KASAN: use-after-free in sysv_new_block+0x79f/0x990 fs/sysv/balloc.c:113 Read of size 4 at addr ffff88801a3d80c8 by task syz-executor.4/3326 CPU: 0 PID: 3326 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432 sysv_new_block+0x79f/0x990 fs/sysv/balloc.c:113 alloc_branch fs/sysv/itree.c:134 [inline] get_block+0x3fa/0x1510 fs/sysv/itree.c:251 __block_write_begin_int+0x46c/0x17b0 fs/buffer.c:1978 __block_write_begin fs/buffer.c:2028 [inline] block_write_begin+0x58/0x2e0 fs/buffer.c:2087 sysv_write_begin+0x35/0xe0 fs/sysv/itree.c:485 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295 generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f97a31cf0a9 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:00007f979930f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f97a32ef120 RCX: 00007f97a31cf0a9 RDX: 000000000000010a RSI: 0000000020000000 RDI: 0000000000000005 RBP: 00007f97a322aae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc29f5634f R14: 00007f979930f300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea000068f600 count:0 mapcount:0 mapping:0000000000000000 index:0x1 flags: 0xfff00000000000() raw: 00fff00000000000 dead000000000100 dead000000000200 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801a3d7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801a3d8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88801a3d8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88801a3d8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801a3d8180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================