ci starts bisection 2023-05-08 15:01:17.982163511 +0000 UTC m=+208708.243815337 bisecting fixing commit since 62bad54b26db8bc98e28749cd76b2d890edb4258 building syzkaller on f325deb023e4e2fb9197004be1b3da738680429c ensuring issue is reproducible on original commit 62bad54b26db8bc98e28749cd76b2d890edb4258 testing commit 62bad54b26db8bc98e28749cd76b2d890edb4258 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7286a8f09537298f797bf4918f27cb303fdf5137c2002ec695092617057f9d00 run #0: crashed: KASAN: use-after-free Read in sysv_new_block run #1: crashed: KASAN: use-after-free Read in sysv_new_block run #2: crashed: KASAN: use-after-free Read in sysv_new_block run #3: crashed: KASAN: use-after-free Read in sysv_new_block run #4: crashed: KASAN: slab-out-of-bounds Read in sysv_new_block run #5: crashed: KASAN: use-after-free Read in sysv_new_block run #6: crashed: KASAN: use-after-free Read in sysv_new_block run #7: crashed: KASAN: null-ptr-deref Write in get_block run #8: crashed: KASAN: use-after-free Read in sysv_new_block run #9: crashed: KASAN: use-after-free Read in sysv_new_block run #10: crashed: KASAN: slab-out-of-bounds Read in sysv_new_block run #11: crashed: KASAN: null-ptr-deref Write in get_block run #12: crashed: KASAN: use-after-free Read in sysv_new_block run #13: crashed: KASAN: use-after-free Read in sysv_new_block run #14: crashed: KASAN: use-after-free Read in sysv_new_block run #15: crashed: KASAN: use-after-free Read in sysv_new_block run #16: crashed: KASAN: use-after-free Read in sysv_new_block run #17: crashed: KASAN: slab-out-of-bounds Read in sysv_new_block run #18: crashed: KASAN: use-after-free Read in sysv_new_block run #19: OK testing current HEAD ac9a78681b921877518763ba0e89202254349d1b testing commit ac9a78681b921877518763ba0e89202254349d1b gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 2642cec531241d28eedcbfac64dd0261317cc72dc075ebd447ddd0f87c02bbb3 run #0: crashed: KASAN: null-ptr-deref Write in get_block run #1: crashed: KASAN: use-after-free Read in sysv_new_block run #2: crashed: KASAN: use-after-free Read in sysv_new_block run #3: crashed: KASAN: use-after-free Read in sysv_new_block run #4: crashed: KASAN: use-after-free Read in sysv_new_block run #5: crashed: KASAN: use-after-free Read in sysv_new_block run #6: crashed: KASAN: use-after-free Read in sysv_new_block run #7: crashed: KASAN: use-after-free Read in sysv_new_block run #8: crashed: KASAN: use-after-free Read in sysv_new_block run #9: crashed: KASAN: use-after-free Read in sysv_new_block crash still not fixed/happens on the oldest tested release revisions tested: 2, total time: 39m52.486020229s (build: 18m48.93399097s, test: 20m21.231062967s) crash still not fixed on HEAD or HEAD had kernel test errors commit msg: Linux 6.4-rc1 crash: KASAN: use-after-free Read in sysv_new_block 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+0x65f/0x890 fs/sysv/balloc.c:113 Read of size 4 at addr ffff88806ebe80c8 by task syz-executor164/15264 CPU: 1 PID: 15264 Comm: syz-executor164 Not tainted 6.4.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x167/0x220 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 sysv_new_block+0x65f/0x890 fs/sysv/balloc.c:113 alloc_branch fs/sysv/itree.c:134 [inline] get_block+0x30d/0x1230 fs/sysv/itree.c:251 __block_write_begin_int+0x393/0x1250 fs/buffer.c:2064 __block_write_begin fs/buffer.c:2114 [inline] block_write_begin+0x72/0x150 fs/buffer.c:2175 sysv_write_begin+0x29/0x50 fs/sysv/itree.c:485 generic_perform_write+0x2f5/0x540 mm/filemap.c:3923 __generic_file_write_iter+0x143/0x340 mm/filemap.c:4051 generic_file_write_iter+0x9d/0x230 mm/filemap.c:4083 call_write_iter include/linux/fs.h:1868 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x719/0x8f0 fs/read_write.c:584 ksys_write+0x163/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd859199e99 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 17 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc8a36aff8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007fd859199e99 RDX: 00000000fffffd5e RSI: 000000002000ad00 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000000140 R09: 0000000000000140 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc8a36b030 R13: 00007ffc8a36b110 R14: 431bde82d7b634db R15: 00007ffc8a36b010 The buggy address belongs to the physical page: page:ffffea0001bafa00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x6ebe8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffff7f(buddy) raw: 00fff00000000000 ffffea0001b60308 ffffea0001ba1f08 0000000000000000 raw: 0000000000000001 0000000000000001 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 5324, tgid 5321 (syz-execprog), ts 82148841959, free_ts 274624059824 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 __folio_alloc+0x13/0x30 mm/page_alloc.c:4800 vma_alloc_folio+0x308/0x680 mm/mempolicy.c:2240 wp_page_copy mm/memory.c:3070 [inline] do_wp_page+0x8ac/0x2600 mm/memory.c:3432 handle_pte_fault mm/memory.c:4964 [inline] __handle_mm_fault mm/memory.c:5089 [inline] handle_mm_fault+0x1e84/0x41f0 mm/memory.c:5243 do_user_addr_fault arch/x86/mm/fault.c:1349 [inline] handle_page_fault arch/x86/mm/fault.c:1534 [inline] exc_page_fault+0x274/0x900 arch/x86/mm/fault.c:1590 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x8fe/0xa10 mm/page_alloc.c:2564 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2705 release_pages+0x1a0f/0x1bc0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:97 [inline] tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu+0xe9/0x1e0 mm/mmu_gather.c:299 tlb_finish_mmu+0xb6/0x1c0 mm/mmu_gather.c:391 zap_page_range_single+0x3fe/0x4c0 mm/memory.c:1756 madvise_dontneed_single_vma mm/madvise.c:803 [inline] madvise_dontneed_free mm/madvise.c:884 [inline] madvise_vma_behavior mm/madvise.c:1023 [inline] madvise_walk_vmas mm/madvise.c:1248 [inline] do_madvise+0x94c/0x35d0 mm/madvise.c:1428 __do_sys_madvise mm/madvise.c:1441 [inline] __se_sys_madvise mm/madvise.c:1439 [inline] __x64_sys_madvise+0xa0/0xb0 mm/madvise.c:1439 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88806ebe7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806ebe8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88806ebe8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806ebe8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806ebe8180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================