All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [net?] KASAN: use-after-free Read in filemap_map_pages
@ 2026-06-01 11:47 syzbot
  2026-08-15 12:51 ` [syzbot] [bridge?] " syzbot
  2026-08-16  6:43 ` Forwarded: " syzbot
  0 siblings, 2 replies; 5+ messages in thread
From: syzbot @ 2026-06-01 11:47 UTC (permalink / raw)
  To: davem, edumazet, horms, kuba, linux-kernel, netdev, pabeni,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    d60ec36cab33 Merge tag 'mm-hotfixes-stable-2026-05-25-16-2..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=124501ec580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=8d24a1331e060dda
dashboard link: https://syzkaller.appspot.com/bug?extid=b72767277f29b6407083
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
userspace arch: i386

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/864236422e21/disk-d60ec36c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/858219f0a900/vmlinux-d60ec36c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/809d091c238e/bzImage-d60ec36c.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b72767277f29b6407083@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in ptep_get include/linux/pgtable.h:461 [inline]
BUG: KASAN: use-after-free in filemap_map_order0_folio mm/filemap.c:3856 [inline]
BUG: KASAN: use-after-free in filemap_map_pages+0xc7a/0x2100 mm/filemap.c:3932
Read of size 8 at addr ffff88807bed6d50 by task syz.1.7707/30545

CPU: 1 UID: 0 PID: 30545 Comm: syz.1.7707 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 ptep_get include/linux/pgtable.h:461 [inline]
 filemap_map_order0_folio mm/filemap.c:3856 [inline]
 filemap_map_pages+0xc7a/0x2100 mm/filemap.c:3932
 do_fault_around mm/memory.c:5867 [inline]
 do_read_fault mm/memory.c:5900 [inline]
 do_fault mm/memory.c:6043 [inline]
 do_pte_missing+0x1f38/0x33f0 mm/memory.c:4566
 handle_pte_fault mm/memory.c:6427 [inline]
 __handle_mm_fault mm/memory.c:6565 [inline]
 handle_mm_fault+0x1bf2/0x3170 mm/memory.c:6734
 do_user_addr_fault+0x75b/0x1340 arch/x86/mm/fault.c:1385
 handle_page_fault arch/x86/mm/fault.c:1474 [inline]
 exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0010:rep_movs_alternative+0x30/0x90 arch/x86/lib/copy_user_64.S:60
Code: 83 f9 08 73 25 85 c9 74 0f 8a 06 88 07 48 ff c7 48 ff c6 48 ff c9 75 f1 c3 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <48> 8b 06 48 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 db 83 f9 08
RSP: 0000:ffffc9000cb978b8 EFLAGS: 00050206
RAX: 00007ffffffff001 RBX: 000000000000001c RCX: 000000000000001c
RDX: 0000000000000001 RSI: 00000000800bcae0 RDI: ffffc9000cb97940
RBP: ffffc9000cb979d0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52001972f2b R12: dffffc0000000000
R13: ffffc9000cb97c80 R14: ffffc9000cb97940 R15: 00000000800bcae0
 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline]
 raw_copy_from_user arch/x86/include/asm/uaccess_64.h:141 [inline]
 _inline_copy_from_user include/linux/uaccess.h:185 [inline]
 _copy_from_user+0x7a/0xb0 lib/usercopy.c:18
 copy_from_user include/linux/uaccess.h:223 [inline]
 get_compat_msghdr+0xb3/0x4c0 net/compat.c:91
 recvmsg_copy_msghdr net/socket.c:2882 [inline]
 ___sys_recvmsg+0x1dd/0x590 net/socket.c:2956
 do_recvmmsg+0x3a5/0x800 net/socket.c:3047
 __sys_recvmmsg+0x1a5/0x290 net/socket.c:3129
 __do_compat_sys_recvmmsg_time32 net/compat.c:418 [inline]
 __se_compat_sys_recvmmsg_time32 net/compat.c:414 [inline]
 __ia32_compat_sys_recvmmsg_time32+0xbf/0xe0 net/compat.c:414
 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
 __do_fast_syscall_32+0x229/0x6e0 arch/x86/entry/syscall_32.c:307
 do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7fa501c
Code: 90 85 d2 74 0a 89 ce 81 e6 ff 0f 00 00 89 32 85 c0 74 05 c1 e9 0c 89 08 31 c0 5e 5d c3 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 58 b8
RSP: 002b:00000000f544550c EFLAGS: 00000206 ORIG_RAX: 0000000000000151
RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00000000800000c0
RDX: 0000000000010106 RSI: 0000000000000002 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x121f pfn:0x7bed6
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea0000fea188 ffffea0002346808 0000000000000000
raw: 000000000000121f 0000000000000000 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x140cc2(GFP_HIGHUSER|__GFP_COMP), pid 29415, tgid 29414 (syz.1.7355), ts 1634224509357, free_ts 1634614223058
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x22d/0x280 mm/page_alloc.c:1853
 prep_new_page mm/page_alloc.c:1861 [inline]
 get_page_from_freelist+0x2593/0x2610 mm/page_alloc.c:3941
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5221
 alloc_pages_mpol+0x235/0x490 mm/mempolicy.c:2490
 alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline]
 alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2581
 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2591
 filemap_alloc_folio_noprof+0x111/0x470 mm/filemap.c:1014
 filemap_create_folio mm/filemap.c:2612 [inline]
 filemap_get_pages+0x819/0x1ef0 mm/filemap.c:2702
 filemap_read+0x447/0x1230 mm/filemap.c:2806
 __kernel_read+0x504/0x9b0 fs/read_write.c:532
 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline]
 ima_calc_file_hash+0x446/0x860 security/integrity/ima/ima_crypto.c:280
 ima_collect_measurement+0x51d/0x9c0 security/integrity/ima/ima_api.c:300
 process_measurement+0x12cd/0x1c80 security/integrity/ima/ima_main.c:425
 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685
 security_file_post_open+0xb3/0x260 security/security.c:2755
page last free pid 29415 tgid 29414 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1397 [inline]
 free_unref_folios+0xd9f/0x14c0 mm/page_alloc.c:2999
 folios_put_refs+0x9ff/0xb40 mm/swap.c:1008
 folio_batch_release include/linux/folio_batch.h:101 [inline]
 truncate_inode_pages_range+0x3dd/0xe30 mm/truncate.c:408
 evict+0x631/0xb10 fs/inode.c:843
 __dentry_kill+0x1a2/0x690 fs/dcache.c:718
 shrink_kill+0xa9/0x2c0 fs/dcache.c:1195
 shrink_dentry_list+0x2e0/0x5e0 fs/dcache.c:1222
 shrink_dcache_tree+0xe9/0x5d0 fs/dcache.c:-1
 do_one_tree fs/dcache.c:1721 [inline]
 shrink_dcache_for_umount+0xa8/0x1f0 fs/dcache.c:1738
 generic_shutdown_super+0x6f/0x2d0 fs/super.c:624
 kill_anon_super+0x3b/0x70 fs/super.c:1292
 deactivate_locked_super+0xbc/0x130 fs/super.c:476
 cleanup_mnt+0x437/0x4d0 fs/namespace.c:1312
 task_work_run+0x1d9/0x270 kernel/task_work.c:233
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0x70f/0x22c0 kernel/exit.c:976
 do_group_exit+0x21b/0x2d0 kernel/exit.c:1119

Memory state around the buggy address:
 ffff88807bed6c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88807bed6c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88807bed6d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                 ^
 ffff88807bed6d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88807bed6e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
   0:	83 f9 08             	cmp    $0x8,%ecx
   3:	73 25                	jae    0x2a
   5:	85 c9                	test   %ecx,%ecx
   7:	74 0f                	je     0x18
   9:	8a 06                	mov    (%rsi),%al
   b:	88 07                	mov    %al,(%rdi)
   d:	48 ff c7             	inc    %rdi
  10:	48 ff c6             	inc    %rsi
  13:	48 ff c9             	dec    %rcx
  16:	75 f1                	jne    0x9
  18:	c3                   	ret
  19:	cc                   	int3
  1a:	cc                   	int3
  1b:	cc                   	int3
  1c:	cc                   	int3
  1d:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
  24:	00 00 00
  27:	0f 1f 00             	nopl   (%rax)
* 2a:	48 8b 06             	mov    (%rsi),%rax <-- trapping instruction
  2d:	48 89 07             	mov    %rax,(%rdi)
  30:	48 83 c6 08          	add    $0x8,%rsi
  34:	48 83 c7 08          	add    $0x8,%rdi
  38:	83 e9 08             	sub    $0x8,%ecx
  3b:	74 db                	je     0x18
  3d:	83 f9 08             	cmp    $0x8,%ecx


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] [bridge?] KASAN: use-after-free Read in filemap_map_pages
  2026-06-01 11:47 [syzbot] [net?] KASAN: use-after-free Read in filemap_map_pages syzbot
@ 2026-08-15 12:51 ` syzbot
  2026-08-16  2:17   ` Hillf Danton
  2026-08-16  6:43 ` Forwarded: " syzbot
  1 sibling, 1 reply; 5+ messages in thread
From: syzbot @ 2026-08-15 12:51 UTC (permalink / raw)
  To: bridge, davem, edumazet, horms, idosch, kuba, linux-kernel,
	netdev, pabeni, razor, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    15ef2f78c49d Merge tag 'input-for-v7.2-rc7' of git://git.k..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11cfe279580000
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
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15cfe279580000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b72767277f29b6407083@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in ptep_get include/linux/pgtable.h:495 [inline]
BUG: KASAN: use-after-free in filemap_map_folio_range mm/filemap.c:3820 [inline]
BUG: KASAN: use-after-free in filemap_map_pages+0x1b75/0x1f80 mm/filemap.c:3955
Read of size 8 at addr ffff88803f851a00 by task syz-executor403/6035

CPU: 2 UID: 0 PID: 6035 Comm: syz-executor403 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:
 <TASK>
 __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:ffffc90003a87af8 EFLAGS: 00050293
RAX: 0000000000000000 RBX: 00007fe62c200000 RCX: ffffffff825c2758
RDX: ffff888033b84a80 RSI: ffffffff825c271e RDI: ffff888033b84a80
RBP: 00007fe62c200001 R08: 0000000000000006 R09: 00007fe62c200001
R10: 00007fe62c200000 R11: 0000000000000000 R12: 0000000000000001
R13: 1ffff92000750f60 R14: 0000000000000000 R15: 00007fe62c200000
 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:0x7fe62c7fce5e
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 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fe62b9fe1a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffda RBX: 00007fe62b9fe6c0 RCX: 00007fe62c7fce5e
RDX: 0000000000000001 RSI: 00007fe62c200000 RDI: 0000000000000003
RBP: 0000000000000021 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000000 R14: 00007ffdde346d90 R15: 00007ffdde346e78
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x3f851
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000
raw: ffff888000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 6004, tgid 6004 (cmp), ts 79653237963, free_ts 79740307238
 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_pages_mpol+0x1fb/0x540 mm/mempolicy.c:2490
 alloc_pages_noprof+0x1a/0x160 mm/mempolicy.c:2581
 pagetable_alloc_noprof include/linux/mm.h:3685 [inline]
 pmd_alloc_one_noprof include/asm-generic/pgalloc.h:143 [inline]
 __pmd_alloc+0x3b/0x950 mm/memory.c:6772
 pmd_alloc include/linux/mm.h:3601 [inline]
 __handle_mm_fault+0xa9c/0x2a00 mm/memory.c:6469
 handle_mm_fault+0x37b/0xa30 mm/memory.c:6686
 do_user_addr_fault+0x5a3/0x12f0 arch/x86/mm/fault.c:1343
 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
page last free pid 6002 tgid 6002 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
 __pagetable_free include/linux/mm.h:3695 [inline]
 pagetable_free include/linux/mm.h:3719 [inline]
 pagetable_dtor_free include/linux/mm.h:3818 [inline]
 __tlb_remove_table include/asm-generic/tlb.h:221 [inline]
 __tlb_remove_table_free mm/mmu_gather.c:228 [inline]
 tlb_remove_table_rcu+0x2cf/0x380 mm/mmu_gather.c:291
 rcu_do_batch kernel/rcu/tree.c:2645 [inline]
 rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2897
 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
 sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674

Memory state around the buggy address:
 ffff88803f851900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88803f851980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88803f851a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff88803f851a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88803f851b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
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


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] [bridge?] KASAN: use-after-free Read in filemap_map_pages
  2026-08-15 12:51 ` [syzbot] [bridge?] " syzbot
@ 2026-08-16  2:17   ` Hillf Danton
  2026-08-16  2:34     ` syzbot
  0 siblings, 1 reply; 5+ messages in thread
From: Hillf Danton @ 2026-08-16  2:17 UTC (permalink / raw)
  To: syzbot; +Cc: linux-kernel, syzkaller-bugs

> Date: Sat, 15 Aug 2026 05:51:23 -0700	[thread overview]
> syzbot has found a reproducer for the following issue on:
> 
> HEAD commit:    15ef2f78c49d Merge tag 'input-for-v7.2-rc7' of git://git.k..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11cfe279580000
> 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
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15cfe279580000

#syz test

--- x/mm/mmu_gather.c
+++ y/mm/mmu_gather.c
@@ -358,7 +358,7 @@ static inline void __tlb_remove_table_on
 #else
 static inline void __tlb_remove_table_one(void *table)
 {
-	tlb_remove_table_sync_rcu();
+	tlb_remove_table_sync_one();
 	__tlb_remove_table(table);
 }
 #endif /* CONFIG_PT_RECLAIM */
--

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [syzbot] [bridge?] KASAN: use-after-free Read in filemap_map_pages
  2026-08-16  2:17   ` Hillf Danton
@ 2026-08-16  2:34     ` syzbot
  0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2026-08-16  2:34 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

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:
 <TASK>
 __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 <c3> 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
 </TASK>

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Forwarded: Re: [syzbot] [bridge?] KASAN: use-after-free Read in filemap_map_pages
  2026-06-01 11:47 [syzbot] [net?] KASAN: use-after-free Read in filemap_map_pages syzbot
  2026-08-15 12:51 ` [syzbot] [bridge?] " syzbot
@ 2026-08-16  6:43 ` syzbot
  1 sibling, 0 replies; 5+ messages in thread
From: syzbot @ 2026-08-16  6:43 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: Re: [syzbot] [bridge?] KASAN: use-after-free Read in filemap_map_pages
Author: idosch@nvidia.com

#syz unset subsystems

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-16  6:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 11:47 [syzbot] [net?] KASAN: use-after-free Read in filemap_map_pages syzbot
2026-08-15 12:51 ` [syzbot] [bridge?] " syzbot
2026-08-16  2:17   ` Hillf Danton
2026-08-16  2:34     ` syzbot
2026-08-16  6:43 ` Forwarded: " syzbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.