From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABC4232FA3B for ; Wed, 19 Nov 2025 17:53:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763574792; cv=none; b=VQqQvpmMZZatIRD2Aawh+yciGo5uUeqW30PUOaDGJEpo/0bhJdWEquagzB201Fx/JTU1R2AbEGJGQLBQIKj9G1t9OYqAocBprWHdJq0rbvIf0J6jhbf5gOWhwoeLXkJPk1eOQ6fVKU9oQ7dhzjxeZy7+XtJ2eptNjExZjF10EVg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763574792; c=relaxed/simple; bh=5xBF39gwM0U3GU0AMGe8rQd2TE1HmGXHOWU3zn5/RNE=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=c7hCqaf0U6fFyHJQStjQyJULUJTKawhGuM8qW2RtpvGq/DLZirZzqis5+cvF45jKImK3fV9+CJfPg9oJk+kALjoJ9D3jWwYNIvprwfWG08c7jDor9+wfzJwdHiYJYv8kGnmcLoagBy1WFsg7Eaz+elzIxzxIpT9EnJ4iDnmov2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f199.google.com with SMTP id e9e14a558f8ab-433270dad0dso14006085ab.0 for ; Wed, 19 Nov 2025 09:53:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763574782; x=1764179582; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LYN0ikyeeqBirj1bWeaj1V3t7KGDPncTYaCkbWKboHE=; b=Z65HRcLg77vFNTmtS9Sk48XqC0yeenADhMKvzUwcI6nz88ntQgRpT6l/JT6CXn7jzV PORkhekSLLnpR86DYlQLKHywL5vDbx7JBMP/kwtQQxg/YLHV7vUjEzOraN4puRt16Td3 yOfKiinEJBMZywsYmiVmOovfFVD8hZuQMDcDxuFBCTdJjaa89ozscJHCZu4EpdY7v2bs PQm5wc3cvgdlWHx+WSxX2/fkQshkTQHMuDhgx8VmqKGI8Y27IexrLpIyoBejf3cPXrHw 5zw9KEiObQV5Nd4eEyjC4+wmEnTFVygW8dM1TJ5pALcTWg8D39PfaDUU9nxBaoGWfQhh 2vOw== X-Forwarded-Encrypted: i=1; AJvYcCX2/xHUZb+/jD6GXxyJl6fGBRVyeVIr/VQTwi8kavF8aL5Esl0NInflkMGKWOxpkBG1Rcd0PHRnSgmaJ1s=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3no0qAzTE1eZ/jRDKNZRzYSrdJphtdARof5DgWnaLhudSONsE 9EZq8vy0yzG8QH5vWzd+Lz5KLRf+gzjdzNgk9Mq/lfdxglMxpyWvMdfQUAvWhrznsxNfl7FiY6G g/h/Hx9/U5dL5zqsUKvaorQJyWxwPyzeFhtfrlAtkR5fyQmBtEKED60jCHa0= X-Google-Smtp-Source: AGHT+IFrGVWyFeOTzNZckgg/p/LhpBKok+RwyLFAxeap1DA/1Nl4Fzy14juLSsHn2gnp1p3o8v9Vo8tsCdTKrwmhnyFQUbPNm1/s Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a92:cb85:0:b0:434:96ea:ca19 with SMTP id e9e14a558f8ab-435a017868cmr25196165ab.17.1763574782104; Wed, 19 Nov 2025 09:53:02 -0800 (PST) Date: Wed, 19 Nov 2025 09:53:02 -0800 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <691e03fe.a70a0220.d98e3.0018.GAE@google.com> Subject: Re: [syzbot] [ext4?] KASAN: use-after-free Read in ext4_find_extent (4) From: syzbot To: albinbabuvarghese20@gmail.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot has tested the proposed patch but the reproducer is still triggering an issue: KASAN: use-after-free Read in ext4_find_extent loop0: detected capacity change from 0 to 1024 EXT4-fs: Ignoring removed oldalloc option EXT4-fs: Ignoring removed orlov option EXT4-fs (loop0): stripe (1570) is not aligned with cluster size (16), stripe is disabled ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:841 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xae6/0xcc0 fs/ext4/extents.c:956 Read of size 4 at addr ffff88805848d018 by task syz.0.1716/13445 CPU: 1 UID: 0 PID: 13445 Comm: syz.0.1716 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ext4_ext_binsearch fs/ext4/extents.c:841 [inline] ext4_find_extent+0xae6/0xcc0 fs/ext4/extents.c:956 ext4_ext_map_blocks+0x288/0x6ac0 fs/ext4/extents.c:4208 ext4_map_query_blocks+0x13b/0x930 fs/ext4/inode.c:550 ext4_map_blocks+0x4b3/0x1740 fs/ext4/inode.c:773 _ext4_get_block+0x200/0x4c0 fs/ext4/inode.c:910 ext4_get_block_unwritten+0x2e/0x100 fs/ext4/inode.c:943 ext4_block_write_begin+0x993/0x1710 fs/ext4/inode.c:1198 ext4_write_begin+0xc04/0x19a0 fs/ext4/ext4_jbd2.h:-1 ext4_da_write_begin+0x445/0xda0 fs/ext4/inode.c:3129 generic_perform_write+0x2c5/0x900 mm/filemap.c:4254 ext4_buffered_write_iter+0xce/0x3a0 fs/ext4/file.c:299 ext4_file_write_iter+0x298/0x1bc0 fs/ext4/file.c:-1 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_pwrite64 fs/read_write.c:793 [inline] __do_sys_pwrite64 fs/read_write.c:801 [inline] __se_sys_pwrite64 fs/read_write.c:798 [inline] __x64_sys_pwrite64+0x193/0x220 fs/read_write.c:798 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb6d7d8e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb6d8cd4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007fb6d7fb5fa0 RCX: 00007fb6d7d8e929 RDX: 000000000000fdef RSI: 0000200000000140 RDI: 0000000000000004 RBP: 00007fb6d7e10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000e7c R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb6d7fb5fa0 R15: 00007ffe519db498 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xc00772c pfn:0x5848d flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 000000000c00772c 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_ZERO|__GFP_COMP), pid 6135, tgid 6130 (syz-execprog), ts 118165039414, free_ts 376890617757 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1845 prep_new_page mm/page_alloc.c:1853 [inline] get_page_from_freelist+0x2356/0x2430 mm/page_alloc.c:3879 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5178 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 folio_alloc_mpol_noprof mm/mempolicy.c:2435 [inline] vma_alloc_folio_noprof+0xe4/0x200 mm/mempolicy.c:2470 folio_prealloc+0x30/0x180 mm/memory.c:-1 alloc_anon_folio mm/memory.c:5126 [inline] do_anonymous_page mm/memory.c:5183 [inline] do_pte_missing mm/memory.c:4360 [inline] handle_pte_fault mm/memory.c:6195 [inline] __handle_mm_fault+0x2a8b/0x5400 mm/memory.c:6336 handle_mm_fault+0x2d5/0x7f0 mm/memory.c:6505 do_user_addr_fault+0xa7c/0x1380 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x82/0x100 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 page last free pid 6132 tgid 6130 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] free_unref_folios+0xe5d/0x15f0 mm/page_alloc.c:2958 folios_put_refs+0x584/0x670 mm/swap.c:1002 free_pages_and_swap_cache+0x277/0x520 mm/swap_state.c:355 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:397 [inline] tlb_flush_mmu+0x3a0/0x680 mm/mmu_gather.c:404 tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:497 madvise_finish_tlb mm/madvise.c:1790 [inline] do_madvise+0x208/0x270 mm/madvise.c:1979 __do_sys_madvise mm/madvise.c:1987 [inline] __se_sys_madvise mm/madvise.c:1985 [inline] __x64_sys_madvise+0xa7/0xc0 mm/madvise.c:1985 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805848cf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805848cf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805848d000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805848d080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805848d100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Tested on: commit: 8b690556 Merge tag 'for-linus' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=12e90742580000 kernel config: https://syzkaller.appspot.com/x/.config?x=6e611fe59206f39f dashboard link: https://syzkaller.appspot.com/bug?extid=ee60e584b5c6bb229126 compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 patch: https://syzkaller.appspot.com/x/patch.diff?x=169cce0a580000