From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (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 7F2EA29B78D for ; Sun, 16 Aug 2026 02:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786847645; cv=none; b=CTwbSYhzchoI8HuWMmXoYpo0fHFakjhiubOYl4kA2Ry88P6EOYlqSv1l4FbUWNe5/GujBEMqTvENecNAgJziem5joiEwWhpJTXqZMJshvN9S/ZBLx+fDUa3Cu4R40vNmOpwwSru1sn/bJLyU7ce03/g9ORjwdUKQkV8Zu4oKG58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786847645; c=relaxed/simple; bh=wnGXeJoaFsp6s/BlPZCDP9i8aoMdL8FpNGKmdGYnH1w=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=UUEDc1x6l+upa/2r6NYSjIBGhHL3JiP370nGH/L6lbOSqLKB4YcwTydLrl+Mf37TmyWLF/jPRVYXfbKcBcAbmOoj6BHWmXLvNR3YJ+RgyY8UvA9XicesmvODZ6La7ikrI3i0dB+E1qfcniKxrmdI9s989N1QH8z6JnE0aGoLKxc= 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.210.69 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-ot1-f69.google.com with SMTP id 46e09a7af769-7e9ee20bde0so3630096a34.2 for ; Sat, 15 Aug 2026 19:34:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786847642; x=1787452442; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=E0BaZTVxFJZ9QhUacOFh8NZkifzsHL3P1vuCr8enhNo=; b=C5v3La/DlrpPpYTvK5Iiphrs9b4+Jyy46wJREX71zU+nRpFsdbFtVQaMfg7WxF7G4r sOQR7DQZXMqzFBHIlu0GQYB6KvMEdj5lI9x32yA6cThQmcTGi+mrcQ9E/eqzxgOqaeAw 3+Ko45h9MNP0EoKrwwPFR0mG8coAQ6cXOJBJfm7La5nkWEiTZNzI0ELraQ+GTbvqrWt9 0pC7zTZOhmzMFJQhlJV0ApmrEXu4A7tT0M1+jVG9CjY/obyLRikb9sbhGVSH42xmJlzU z9tVP7wtHhKhekKIm7kYbvH/bHNjmmD1DAVrk5q3KoBlwMdGmU8Lqi9djrxdYn/GTtuX 2Nwg== X-Forwarded-Encrypted: i=1; AHgh+RonsQP45loWOhE9zKLVsKg3kmLwcDiOy9vrB0xT/vap7vKkwpKIldK2mdJSBkQIcg1Bm3aXsCnyxZdnu8o=@vger.kernel.org X-Gm-Message-State: AOJu0YzFIhjg8bZFkyl1swn5HRJxiaSCU0Nx6SwirM6Bb6tJFqh08pry pKcqdOQXQPe9hjN23n7jlQhKy+tyrGBASP/devLrepzkci/XULt7yb/a8DSTbRlOXnhcglQ9rMY ILRD5FUNPwv5Ogt2dCbGhadtyzYJDshnw0aeTgcdp4yvhQ9qDi/P1sQEM8ms= 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:6820:1889:b0:6aa:9be1:4844 with SMTP id 006d021491bc7-6b0d5fdaca2mr14423351eaf.5.1786847642449; Sat, 15 Aug 2026 19:34:02 -0700 (PDT) Date: Sat, 15 Aug 2026 19:34:02 -0700 In-Reply-To: <20260816021733.1177-1-hdanton@sina.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a81219a.10853dc7.22f513.000b.GAE@google.com> Subject: Re: [syzbot] [bridge?] KASAN: use-after-free Read in filemap_map_pages From: syzbot To: hdanton@sina.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: slab-out-of-bounds Read in filemap_map_pages ================================================================== BUG: KASAN: slab-out-of-bounds in ptep_get include/linux/pgtable.h:495 [inline] BUG: KASAN: slab-out-of-bounds in filemap_map_folio_range mm/filemap.c:3820 [inline] BUG: KASAN: slab-out-of-bounds in filemap_map_pages+0x1b75/0x1f80 mm/filemap.c:3955 Read of size 8 at addr ffff88803cb81a60 by task syz-executor275/6045 CPU: 0 UID: 0 PID: 6045 Comm: syz-executor275 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 ptep_get include/linux/pgtable.h:495 [inline] filemap_map_folio_range mm/filemap.c:3820 [inline] filemap_map_pages+0x1b75/0x1f80 mm/filemap.c:3955 do_fault_around mm/memory.c:5818 [inline] do_read_fault mm/memory.c:5851 [inline] do_fault+0x985/0x1750 mm/memory.c:5994 do_pte_missing mm/memory.c:4566 [inline] handle_pte_fault mm/memory.c:6379 [inline] __handle_mm_fault+0x187d/0x2a00 mm/memory.c:6517 handle_mm_fault+0x37b/0xa30 mm/memory.c:6686 do_user_addr_fault+0x74c/0x12f0 arch/x86/mm/fault.c:1394 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 RIP: 0010:fault_in_readable+0xde/0x190 mm/gup.c:2161 Code: 68 46 ae ff 4c 89 f0 48 85 c0 0f 85 bf 00 00 00 e8 77 4c ae ff 0f 01 cb 0f ae e8 4c 89 fb 4d 85 ff 75 31 eb 48 e8 62 4c ae ff <44> 8a 33 e8 5a 4c ae ff 48 81 c3 00 10 00 00 31 ff 48 81 e3 00 f0 RSP: 0018:ffffc900030d7af8 EFLAGS: 00050293 RAX: 0000000000000000 RBX: 00007fb9fe400000 RCX: ffffffff825c2758 RDX: ffff88802a614a80 RSI: ffffffff825c271e RDI: ffff88802a614a80 RBP: 00007fb9fe400001 R08: 0000000000000006 R09: 00007fb9fe400001 R10: 00007fb9fe400000 R11: 0000000000000000 R12: 0000000000000001 R13: 1ffff9200061af60 R14: 0000000000000000 R15: 00007fb9fe400000 fault_in_iov_iter_readable+0x101/0x2c0 lib/iov_iter.c:106 generic_perform_write+0x863/0xa40 mm/filemap.c:4413 shmem_file_write_iter+0x10e/0x140 mm/shmem.c:3424 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1050 fs/read_write.c:687 ksys_pwrite64 fs/read_write.c:794 [inline] __do_sys_pwrite64 fs/read_write.c:802 [inline] __se_sys_pwrite64 fs/read_write.c:799 [inline] __x64_sys_pwrite64+0x1eb/0x250 fs/read_write.c:799 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb9fe9f8e5e Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08 RSP: 002b:00007fb9fdbfe1a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007fb9fdbfe6c0 RCX: 00007fb9fe9f8e5e RDX: 0000000000000001 RSI: 00007fb9fe400000 RDI: 0000000000000003 RBP: 0000000000000021 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0 R13: 0000000000000000 R14: 00007fff5b6bda40 R15: 00007fff5b6bdb28 Allocated by task 5144: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5334 [inline] __kvmalloc_node_noprof+0x34f/0x970 mm/slub.c:6905 simple_xattr_alloc+0x6c/0xd0 fs/xattr.c:1271 class_simple_xattr_constructor include/linux/xattr.h:166 [inline] simple_xattr_set+0xa8/0x3ca0 fs/xattr.c:1438 shmem_xattr_handler_set+0x326/0x3c0 mm/shmem.c:4266 __vfs_setxattr+0x175/0x1e0 fs/xattr.c:223 __vfs_setxattr_noperm+0x127/0x660 fs/xattr.c:257 __vfs_setxattr_locked+0x127/0x2b0 fs/xattr.c:318 vfs_setxattr+0x14a/0x390 fs/xattr.c:344 do_setxattr+0x145/0x180 fs/xattr.c:662 filename_setxattr+0x167/0x1d0 fs/xattr.c:690 path_setxattrat+0x1ff/0x3b0 fs/xattr.c:734 __do_sys_lsetxattr fs/xattr.c:775 [inline] __se_sys_lsetxattr fs/xattr.c:771 [inline] __x64_sys_lsetxattr+0xc9/0x140 fs/xattr.c:771 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803cb81a00 which belongs to the cache kmalloc-cg-128 of size 128 The buggy address is located 96 bytes inside of allocated 98-byte region [ffff88803cb81a00, ffff88803cb81a62) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88803cb81f00 pfn:0x3cb81 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801c049b80 ffffea000161cb90 ffffea0000b6dbd0 raw: ffff88803cb81f00 000000080010000f 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5144, tgid 5144 (udevd), ts 32535993040, free_ts 32521083899 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab mm/slub.c:3380 [inline] new_slab+0xa2/0x640 mm/slub.c:3426 refill_objects+0xe3/0x410 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kvmalloc_node_noprof+0x793/0x970 mm/slub.c:6905 simple_xattr_alloc+0x6c/0xd0 fs/xattr.c:1271 class_simple_xattr_constructor include/linux/xattr.h:166 [inline] simple_xattr_set+0xa8/0x3ca0 fs/xattr.c:1438 shmem_xattr_handler_set+0x326/0x3c0 mm/shmem.c:4266 __vfs_setxattr+0x175/0x1e0 fs/xattr.c:223 __vfs_setxattr_noperm+0x127/0x660 fs/xattr.c:257 __vfs_setxattr_locked+0x127/0x2b0 fs/xattr.c:318 vfs_setxattr+0x14a/0x390 fs/xattr.c:344 do_setxattr+0x145/0x180 fs/xattr.c:662 filename_setxattr+0x167/0x1d0 fs/xattr.c:690 page last free pid 5152 tgid 5152 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4584 [inline] slab_alloc_node mm/slub.c:4917 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_noprof+0x2bf/0x820 mm/slub.c:5359 _kmalloc_noprof include/linux/slab.h:992 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] tomoyo_encode2+0xfb/0x3c0 security/tomoyo/realpath.c:45 tomoyo_encode+0x29/0x50 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x18c/0x690 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x276/0x460 security/tomoyo/file.c:827 security_inode_getattr+0x116/0x280 security/security.c:1895 vfs_getattr fs/stat.c:259 [inline] vfs_statx_path fs/stat.c:299 [inline] vfs_statx+0x11f/0x3f0 fs/stat.c:356 vfs_fstatat+0x77/0xe0 fs/stat.c:373 __do_sys_newfstatat+0x9d/0x120 fs/stat.c:538 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88803cb81900: 00 00 00 00 00 00 00 00 00 00 00 00 02 fc fc fc ffff88803cb81980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803cb81a00: 00 00 00 00 00 00 00 00 00 00 00 00 02 fc fc fc ^ ffff88803cb81a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803cb81b00: 00 00 00 00 00 00 00 00 00 00 00 00 02 fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 68 46 ae ff 4c push $0x4cffae46 5: 89 f0 mov %esi,%eax 7: 48 85 c0 test %rax,%rax a: 0f 85 bf 00 00 00 jne 0xcf 10: e8 77 4c ae ff call 0xffae4c8c 15: 0f 01 cb stac 18: 0f ae e8 lfence 1b: 4c 89 fb mov %r15,%rbx 1e: 4d 85 ff test %r15,%r15 21: 75 31 jne 0x54 23: eb 48 jmp 0x6d 25: e8 62 4c ae ff call 0xffae4c8c * 2a: 44 8a 33 mov (%rbx),%r14b <-- trapping instruction 2d: e8 5a 4c ae ff call 0xffae4c8c 32: 48 81 c3 00 10 00 00 add $0x1000,%rbx 39: 31 ff xor %edi,%edi 3b: 48 rex.W 3c: 81 .byte 0x81 3d: e3 00 jrcxz 0x3f 3f: f0 lock Tested on: commit: 3eb40771 Merge tag 'soc-fixes-7.2-3' of git://git.kern.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1265e949580000 kernel config: https://syzkaller.appspot.com/x/.config?x=1d67342c314f228d dashboard link: https://syzkaller.appspot.com/bug?extid=b72767277f29b6407083 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 patch: https://syzkaller.appspot.com/x/patch.diff?x=1197b279580000