ci starts bisection 2023-02-27 14:01:01.536595303 +0000 UTC m=+23315.262153065 bisecting fixing commit since ec34c2b4ec383766a42ffd9206dc6605be3c6f6c building syzkaller on 4067838e6b16173af08e062ce434ecfc46d45bda ensuring issue is reproducible on original commit ec34c2b4ec383766a42ffd9206dc6605be3c6f6c testing commit ec34c2b4ec383766a42ffd9206dc6605be3c6f6c gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 9cb8b7cb8d15216dba961c36c19787c19ad038284b855e2ef7cdeb4cedc42847 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: null-ptr-deref Write in get_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: null-ptr-deref Write in get_block run #10: crashed: KASAN: use-after-free Read in sysv_new_block run #11: crashed: KASAN: use-after-free Read in sysv_new_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: use-after-free Read in sysv_new_block run #18: crashed: KASAN: use-after-free Read in sysv_new_block run #19: crashed: KASAN: use-after-free Read in sysv_new_block testing current HEAD f3a2439f20d918930cc4ae8f76fe1c1afd26958f testing commit f3a2439f20d918930cc4ae8f76fe1c1afd26958f gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 1aa442400200d02db4d15bb8a9b492279396ddb6cbcc64267dbdd3bafaa25ce4 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: null-ptr-deref Write in get_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: null-ptr-deref Write in get_block run #9: crashed: KASAN: use-after-free Read in sysv_new_block revisions tested: 2, total time: 28m47.56542632s (build: 17m52.923014537s, test: 10m0.823148551s) the crash still happens on HEAD commit msg: Merge tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux 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 sysv_free_block: flc_count > flc_size sysv_free_block: flc_count > flc_size ================================================================== BUG: KASAN: use-after-free in sysv_new_block+0x687/0xa70 fs/sysv/balloc.c:113 Read of size 4 at addr ffff88806b5eb0c8 by task syz-executor.0/10468 CPU: 0 PID: 10468 Comm: syz-executor.0 Not tainted 6.2.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x64/0xb0 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 sysv_new_block+0x687/0xa70 fs/sysv/balloc.c:113 alloc_branch fs/sysv/itree.c:134 [inline] get_block+0x1ff/0x1230 fs/sysv/itree.c:251 __block_write_begin_int+0x2b3/0xf60 fs/buffer.c:2034 __block_write_begin fs/buffer.c:2084 [inline] block_write_begin+0x72/0x320 fs/buffer.c:2145 sysv_write_begin+0x2b/0xc0 fs/sysv/itree.c:485 generic_perform_write+0x214/0x490 mm/filemap.c:3926 __generic_file_write_iter+0x212/0x410 mm/filemap.c:4054 generic_file_write_iter+0xc5/0x2c0 mm/filemap.c:4086 call_write_iter include/linux/fs.h:1851 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x823/0xd80 fs/read_write.c:584 ksys_write+0xf2/0x1c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0f89c8c0d9 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:00007f0f8a971168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f0f89dabf80 RCX: 00007f0f89c8c0d9 RDX: 00000000fffffd5e RSI: 000000002000ad00 RDI: 0000000000000004 RBP: 00007f0f89ce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcd6bec36f R14: 00007f0f8a971300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0001ad7ac0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x6b5eb flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001ad9cc8 ffffea0001ad3d08 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 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 10302, tgid 10302 (syz-executor.0), ts 176727675847, free_ts 176808469336 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x1190/0x2f80 mm/page_alloc.c:4325 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5591 __folio_alloc+0x16/0x40 mm/page_alloc.c:5623 vma_alloc_folio+0x11a/0x690 mm/mempolicy.c:2244 do_anonymous_page mm/memory.c:4052 [inline] handle_pte_fault mm/memory.c:4907 [inline] __handle_mm_fault+0x107b/0x2ee0 mm/memory.c:5051 handle_mm_fault+0x17b/0x640 mm/memory.c:5197 do_user_addr_fault+0x2da/0xd00 arch/x86/mm/fault.c:1407 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x5e/0xc0 arch/x86/mm/fault.c:1554 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:1453 [inline] free_pcp_prepare+0x65a/0xb40 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page_list+0x176/0xcd0 mm/page_alloc.c:3528 release_pages+0x320/0x10d0 mm/swap.c:1042 tlb_batch_pages_flush+0x85/0x160 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x114/0x6c0 mm/mmu_gather.c:391 exit_mmap+0x1d0/0x620 mm/mmap.c:3047 __mmput+0xf3/0x440 kernel/fork.c:1209 exit_mm kernel/exit.c:563 [inline] do_exit+0x88d/0x2500 kernel/exit.c:856 do_group_exit+0xb4/0x250 kernel/exit.c:1019 get_signal+0x1d36/0x1fa0 kernel/signal.c:2859 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88806b5eaf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806b5eb000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88806b5eb080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806b5eb100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806b5eb180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================