All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [mm?] KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare (2)
@ 2026-06-20  2:36 syzbot
  2026-06-22 15:35 ` Lorenzo Stoakes
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2026-06-20  2:36 UTC (permalink / raw)
  To: akpm, david, harry, jannh, liam, linux-kernel, linux-mm, ljs,
	riel, syzkaller-bugs, vbabka

Hello,

syzbot found the following issue on:

HEAD commit:    5e2e14749c3d Merge tag 'landlock-7.2-rc1' of git://git.ker..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10e5ccfe580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b0ae27ce66b92956
dashboard link: https://syzkaller.appspot.com/bug?extid=395b7abe9696862fc188
compiler:       Debian clang version 22.1.6 (++20260514074242+fc4aad7b5db3-1~exp1~20260514074407.73), Debian LLD 22.1.6

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a565c60a4762/disk-5e2e1474.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e593a6eb0057/vmlinux-5e2e1474.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d24b55020ea3/bzImage-5e2e1474.xz

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

==================================================================
BUG: KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare

write to 0xffff88811a6a4d00 of 8 bytes by task 20911 on cpu 1:
 __anon_vma_prepare+0x172/0x2f0 mm/rmap.c:212
 __vmf_anon_prepare+0x91/0x100 mm/memory.c:3829
 hugetlb_no_page+0x1b8/0xf30 mm/hugetlb.c:5756
 hugetlb_fault+0x608/0xda0 mm/hugetlb.c:-1
 handle_mm_fault+0x1de9/0x2da0 mm/memory.c:6684
 faultin_page mm/gup.c:1126 [inline]
 __get_user_pages+0x129c/0x1f10 mm/gup.c:1428
 populate_vma_page_range mm/gup.c:1860 [inline]
 __mm_populate+0x242/0x390 mm/gup.c:1963
 mm_populate include/linux/mm.h:4171 [inline]
 vm_mmap_pgoff+0x23b/0x2d0 mm/util.c:586
 ksys_mmap_pgoff+0x2c6/0x310 mm/mmap.c:606
 x64_sys_call+0x14df/0x3020 arch/x86/include/generated/asm/syscalls_64.h:10
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x136/0x3c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811a6a4d00 of 8 bytes by task 20901 on cpu 0:
 __vmf_anon_prepare+0x26/0x100 mm/memory.c:3823
 hugetlb_no_page+0x1b8/0xf30 mm/hugetlb.c:5756
 hugetlb_fault+0x608/0xda0 mm/hugetlb.c:-1
 handle_mm_fault+0x1de9/0x2da0 mm/memory.c:6684
 do_user_addr_fault+0x402/0x1060 arch/x86/mm/fault.c:1394
 handle_page_fault arch/x86/mm/fault.c:1483 [inline]
 exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1536
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595
 __put_user_nocheck_4+0x3/0x20 arch/x86/lib/putuser.S:97
 ____sys_recvmsg+0x1a1/0x280 net/socket.c:2917
 ___sys_recvmsg+0x11f/0x3a0 net/socket.c:2946
 do_recvmmsg+0x1e5/0x560 net/socket.c:3041
 __sys_recvmmsg net/socket.c:3115 [inline]
 __do_sys_recvmmsg net/socket.c:3138 [inline]
 __se_sys_recvmmsg net/socket.c:3131 [inline]
 __x64_sys_recvmmsg+0xe5/0x170 net/socket.c:3131
 x64_sys_call+0x80f/0x3020 arch/x86/include/generated/asm/syscalls_64.h:300
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x136/0x3c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffff8881020cec60

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 20901 Comm: syz.0.4316 Tainted: G        W           syzkaller #0 PREEMPT(lazy) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
==================================================================


---
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] 2+ messages in thread

* Re: [syzbot] [mm?] KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare (2)
  2026-06-20  2:36 [syzbot] [mm?] KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare (2) syzbot
@ 2026-06-22 15:35 ` Lorenzo Stoakes
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Stoakes @ 2026-06-22 15:35 UTC (permalink / raw)
  To: syzbot
  Cc: akpm, david, harry, jannh, liam, linux-kernel, linux-mm, riel,
	syzkaller-bugs, vbabka

This seems to be pretty much identical to the previous report, which we
concluded was benign [0].

I think I'll send a patch to add a data_race() annotation nto the read-side.

[0]:https://lore.kernel.org/linux-mm/6967c517.050a0220.150504.0007.GAE@google.com/

On Fri, Jun 19, 2026 at 07:36:32PM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:    5e2e14749c3d Merge tag 'landlock-7.2-rc1' of git://git.ker..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=10e5ccfe580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=b0ae27ce66b92956
> dashboard link: https://syzkaller.appspot.com/bug?extid=395b7abe9696862fc188
> compiler:       Debian clang version 22.1.6 (++20260514074242+fc4aad7b5db3-1~exp1~20260514074407.73), Debian LLD 22.1.6
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/a565c60a4762/disk-5e2e1474.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/e593a6eb0057/vmlinux-5e2e1474.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/d24b55020ea3/bzImage-5e2e1474.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+395b7abe9696862fc188@syzkaller.appspotmail.com
>
> ==================================================================
> BUG: KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare
>
> write to 0xffff88811a6a4d00 of 8 bytes by task 20911 on cpu 1:
>  __anon_vma_prepare+0x172/0x2f0 mm/rmap.c:212

WRITE: VMA under mmap read lock, page_table_lock:

	vma->anon_vma = anon_vma;

>  __vmf_anon_prepare+0x91/0x100 mm/memory.c:3829
>  hugetlb_no_page+0x1b8/0xf30 mm/hugetlb.c:5756
>  hugetlb_fault+0x608/0xda0 mm/hugetlb.c:-1
>  handle_mm_fault+0x1de9/0x2da0 mm/memory.c:6684
>  faultin_page mm/gup.c:1126 [inline]
>  __get_user_pages+0x129c/0x1f10 mm/gup.c:1428
>  populate_vma_page_range mm/gup.c:1860 [inline]
>  __mm_populate+0x242/0x390 mm/gup.c:1963
>  mm_populate include/linux/mm.h:4171 [inline]
>  vm_mmap_pgoff+0x23b/0x2d0 mm/util.c:586
>  ksys_mmap_pgoff+0x2c6/0x310 mm/mmap.c:606
>  x64_sys_call+0x14df/0x3020 arch/x86/include/generated/asm/syscalls_64.h:10
>  do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
>  do_syscall_64+0x136/0x3c0 arch/x86/entry/syscall_64.c:94
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> read to 0xffff88811a6a4d00 of 8 bytes by task 20901 on cpu 0:
>  __vmf_anon_prepare+0x26/0x100 mm/memory.c:3823

READ: VMA under VMA read lock:

	if (likely(vma->anon_vma))
		return 0;

It's benign because if we race here we'd just recheck in __anon_vma_prepare()
and the mm->page_table_lock would serialise for us.

>  hugetlb_no_page+0x1b8/0xf30 mm/hugetlb.c:5756
>  hugetlb_fault+0x608/0xda0 mm/hugetlb.c:-1
>  handle_mm_fault+0x1de9/0x2da0 mm/memory.c:6684
>  do_user_addr_fault+0x402/0x1060 arch/x86/mm/fault.c:1394
>  handle_page_fault arch/x86/mm/fault.c:1483 [inline]
>  exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1536
>  asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595
>  __put_user_nocheck_4+0x3/0x20 arch/x86/lib/putuser.S:97
>  ____sys_recvmsg+0x1a1/0x280 net/socket.c:2917
>  ___sys_recvmsg+0x11f/0x3a0 net/socket.c:2946
>  do_recvmmsg+0x1e5/0x560 net/socket.c:3041
>  __sys_recvmmsg net/socket.c:3115 [inline]
>  __do_sys_recvmmsg net/socket.c:3138 [inline]
>  __se_sys_recvmmsg net/socket.c:3131 [inline]
>  __x64_sys_recvmmsg+0xe5/0x170 net/socket.c:3131
>  x64_sys_call+0x80f/0x3020 arch/x86/include/generated/asm/syscalls_64.h:300
>  do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
>  do_syscall_64+0x136/0x3c0 arch/x86/entry/syscall_64.c:94
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> value changed: 0x0000000000000000 -> 0xffff8881020cec60
>
> Reported by Kernel Concurrency Sanitizer on:
> CPU: 0 UID: 0 PID: 20901 Comm: syz.0.4316 Tainted: G        W           syzkaller #0 PREEMPT(lazy)
> Tainted: [W]=WARN
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
> ==================================================================
>
>
> ---
> 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

Thanks, Lorenzo


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

end of thread, other threads:[~2026-06-22 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-20  2:36 [syzbot] [mm?] KCSAN: data-race in __anon_vma_prepare / __vmf_anon_prepare (2) syzbot
2026-06-22 15:35 ` Lorenzo Stoakes

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.