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+0x7bb/0xa70 fs/sysv/balloc.c:113 Read of size 4 at addr ffff88803978c0c8 by task syz-executor319/5173 CPU: 1 PID: 5173 Comm: syz-executor319 Not tainted 6.8.0-rc7-syzkaller-00238-g005f6f34bd47 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 sysv_new_block+0x7bb/0xa70 fs/sysv/balloc.c:113 alloc_branch fs/sysv/itree.c:135 [inline] get_block+0x279/0x15c0 fs/sysv/itree.c:256 __block_write_begin_int+0x4fb/0x16e0 fs/buffer.c:2103 __block_write_begin fs/buffer.c:2152 [inline] block_write_begin+0xb1/0x4a0 fs/buffer.c:2211 sysv_write_begin+0x31/0xe0 fs/sysv/itree.c:492 generic_perform_write+0x273/0x620 mm/filemap.c:3930 __generic_file_write_iter+0x1fd/0x240 mm/filemap.c:4025 generic_file_write_iter+0xe7/0x350 mm/filemap.c:4051 call_write_iter include/linux/fs.h:2087 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x6de/0x1110 fs/read_write.c:590 ksys_write+0x12f/0x260 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f7c584358b9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 1f 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe26f70018 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f7c584358b9 RDX: 00000000fffffe45 RSI: 00000000200000c0 RDI: 0000000000000004 RBP: 0000000000000048 R08: 00007f7c58483582 R09: 00007f7c58483582 R10: 0000000000009dc9 R11: 0000000000000246 R12: 0000000000050012 R13: 00007f7c584c2740 R14: 00007ffe26f701d0 R15: 00007ffe26f70190 The buggy address belongs to the physical page: page:ffffea0000e5e300 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3978c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 ffffea0000e5e308 ffffea0000e5e308 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff88803978bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803978c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88803978c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88803978c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803978c180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================