From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) (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 B23C22BF002 for ; Thu, 20 Nov 2025 19:07:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763665627; cv=none; b=SMadX+lQljW304yL8x7Lc32LMbFr3+qwW3TnJSZyuBMHY1EUAMYG/ZpChDjfSNQiyqWBr25papPjX+etuCk4qa5YlM9mjA09CFfDRy+T2IVtEHuksIPt43nPTFELBhdcz9u0+t3/RwArpSpBzQp9622LhcgnimYZQdwlGjcJs9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763665627; c=relaxed/simple; bh=HfocCMBA5RZyNMxdnA2nxljJPANCkVS6dphiND3dx0E=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=LXNorLf+fbrmZOqOtoWhWrmDy+NXPuMrtxV/JKd7uWV/XqTK9x2Whfh20XdB6BCpXXZv72m79qPFnxU96NddiZJ5Nu0F/NFvU+lmpS3yhIVC8821SIJsBErkFSgqnWfBV223Nq9wbwfiL/ihKWQ6LxC4pqebsHOb+PI1Uhd6UNE= 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.198 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-f198.google.com with SMTP id e9e14a558f8ab-433783ff82aso12518555ab.1 for ; Thu, 20 Nov 2025 11:07:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763665623; x=1764270423; 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=D66pZskHEoCKyf9sBn0arbp2XihaN07MPnZjm/9wLUA=; b=TrhlYD/Lfecqx0dOMgj9pKJI22wCEkVgfGCgBkNhHlUAiDhnKbWTV6HjxTSyuVikMM yf0RP+qtDKqnSN6TINSgjav9pIZMvFKJ9VhVIa5xMl0QTBm/f2ELYiclROpKi85/LpaX TER3wN9ATejZFBTkfPJUQpRr40OdzWdoHqUkfkAz24azAMX5kyRDd6nynWsf3HPBeUQM QQolA1TU0z/EbqEt4gJnrA4kLPKvg1MbOgLs8daWPAmoUOzY0tK+neMzWG+EFu7gIqOe THsJ6X5UW6mwM9Rc5IN00jQdk7CVOQJPsawnpFxsJetmo8TOPzUnIIF8K5DYOHIWP6Cu ZzZg== X-Forwarded-Encrypted: i=1; AJvYcCUA07gk70vCPRRiCzno5gVnXdICtNTfhdj9wvAHexr6yjQoP9eM3LTptvgssnlp1eRQFL/Hg4L+QmvixsY=@vger.kernel.org X-Gm-Message-State: AOJu0YzOKTJttgUl7f456OsnIItn5/H8XdYzEZn1u8Y759/a8tR346eZ tnn4zf1z9iq4IxE1SoNZ8dl4Y9e3IoFBZg8qiJmwqTycP0Ef9cchCUsGFjLN/QfmEtoApnLsH0+ FbpQIrVIcrlWeDHTIZJDknojviDjTfOTHrvyJT4VRewg+vDYnJ3/tiocQAQ4= X-Google-Smtp-Source: AGHT+IGm9H++fNe5hf9zsoJMNKYZeVBUfoTLHh7bEbjcpNYmr6hkq9cZjI315kbZSrkc6m3MNmkx+yGYGUUXi9Ooy6xEDYlqgsR7 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:220e:b0:433:7f29:929e with SMTP id e9e14a558f8ab-435b82bef9bmr3794365ab.31.1763665622930; Thu, 20 Nov 2025 11:07:02 -0800 (PST) Date: Thu, 20 Nov 2025 11:07:02 -0800 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <691f66d6.a70a0220.d98e3.0038.GAE@google.com> Subject: Re: [syzbot] [ext4?] KASAN: use-after-free Read in ext4_find_extent (4) From: syzbot To: eraykrdg1@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 ================================================================== 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 ffff88806ecb8e18 by task kworker/u8:9/3520 CPU: 1 UID: 0 PID: 3520 Comm: kworker/u8:9 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work 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_create_blocks fs/ext4/inode.c:609 [inline] ext4_map_blocks+0x860/0x1740 fs/ext4/inode.c:811 ext4_convert_unwritten_extents+0x2ae/0x5d0 fs/ext4/extents.c:4976 ext4_convert_unwritten_io_end_vec+0xff/0x170 fs/ext4/extents.c:5016 ext4_end_io_end+0xc7/0x410 fs/ext4/page-io.c:199 ext4_do_flush_completed_IO fs/ext4/page-io.c:290 [inline] ext4_end_io_rsv_work+0x262/0x330 fs/ext4/page-io.c:305 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x2f pfn:0x6ecb8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001bb2dc8 ffffea0001bb2e48 0000000000000000 raw: 000000000000002f 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 8356, tgid 8355 (syz.0.469), ts 208003260519, free_ts 208144424942 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+0x39/0x70 mm/mempolicy.c:2435 shmem_alloc_folio mm/shmem.c:1870 [inline] shmem_alloc_and_add_folio+0x423/0xf40 mm/shmem.c:1912 shmem_get_folio_gfp+0x59d/0x1660 mm/shmem.c:2535 shmem_get_folio mm/shmem.c:2641 [inline] shmem_write_begin+0xf7/0x2b0 mm/shmem.c:3291 generic_perform_write+0x2c5/0x900 mm/filemap.c:4254 shmem_file_write_iter+0xf8/0x120 mm/shmem.c:3466 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 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 page last free pid 6436 tgid 6436 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 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x49e/0x14b0 mm/shmem.c:1119 shmem_truncate_range mm/shmem.c:1231 [inline] shmem_evict_inode+0x272/0xa70 mm/shmem.c:1359 evict+0x504/0x9c0 fs/inode.c:810 __dentry_kill+0x209/0x660 fs/dcache.c:669 dput+0x19f/0x2b0 fs/dcache.c:911 __fput+0x68e/0xa70 fs/file_table.c:476 task_work_run+0x1d4/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xe9/0x130 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88806ecb8d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806ecb8d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88806ecb8e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806ecb8e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806ecb8f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Tested on: commit: 8e621c9a Merge tag 'net-6.18-rc7' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14babe0a580000 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=115ef692580000