[moderation] [mm?] KCSAN: data-race in __mmput / copy_mm

4 views
Skip to first unread message

syzbot

unread,
Jun 17, 2025, 6:58:25 PM6/17/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4663747812d1 Merge tag 'platform-drivers-x86-v6.16-2' of g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1269b50c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=25d7df3a6a1d1ea6
dashboard link: https://syzkaller.appspot.com/bug?extid=1648f0d2d2e03d560dfc
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
CC: [Liam.H...@oracle.com ak...@linux-foundation.org bse...@google.com da...@redhat.com dietmar....@arm.com juri....@redhat.com ke...@kernel.org linux-...@vger.kernel.org linu...@kvack.org lorenzo...@oracle.com mgo...@suse.de mho...@suse.com mi...@redhat.com pet...@infradead.org ros...@goodmis.org rp...@kernel.org sur...@google.com vba...@suse.cz vincent...@linaro.org vsch...@redhat.com]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/797965614d7e/disk-46637478.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c9eae95993f1/vmlinux-46637478.xz
kernel image: https://storage.googleapis.com/syzbot-assets/147f2b96be3a/bzImage-46637478.xz

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

==================================================================
BUG: KCSAN: data-race in __mmput / copy_mm

write to 0xffff888123dae2a8 of 8 bytes by task 22608 on cpu 1:
__list_del include/linux/list.h:195 [inline]
__list_del_entry include/linux/list.h:218 [inline]
list_del include/linux/list.h:229 [inline]
__mmput+0xe2/0x1c0 kernel/fork.c:1126
mmput+0x40/0x50 kernel/fork.c:1144
exit_mm+0xe4/0x190 kernel/exit.c:581
do_exit+0x40b/0x1590 kernel/exit.c:943
do_group_exit+0x139/0x140 kernel/exit.c:1104
__do_sys_exit_group kernel/exit.c:1115 [inline]
__se_sys_exit_group kernel/exit.c:1113 [inline]
__x64_sys_exit_group+0x1f/0x20 kernel/exit.c:1113
x64_sys_call+0x2fa4/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888123dae1c0 of 1408 bytes by task 13151 on cpu 0:
dup_mm kernel/fork.c:1471 [inline]
copy_mm+0xe2/0x370 kernel/fork.c:1529
copy_process+0xcf1/0x1fe0 kernel/fork.c:2169
kernel_clone+0x16c/0x5b0 kernel/fork.c:2599
__do_sys_clone kernel/fork.c:2742 [inline]
__se_sys_clone kernel/fork.c:2726 [inline]
__x64_sys_clone+0xe6/0x120 kernel/fork.c:2726
x64_sys_call+0x2c59/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:57
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 13151 Comm: syz-executor Not tainted 6.16.0-rc2-syzkaller-00045-g4663747812d1 #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================


---
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 syzk...@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

Aleksandr Nogikh

unread,
Jun 19, 2025, 4:29:43 AM6/19/25
to syzbot, Marco Elver, syzkaller-upst...@googlegroups.com
Hi Marco,

This doesn't look like a false positive KCSAN report, right?
I am thinking about releasing this one to the mailing lists.
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/6851f30f.050a0220.2608ac.0025.GAE%40google.com.

Marco Elver

unread,
Jun 19, 2025, 11:20:28 AM6/19/25
to Aleksandr Nogikh, syzbot, syzkaller-upst...@googlegroups.com
On Thu, 19 Jun 2025 at 10:29, Aleksandr Nogikh <nog...@google.com> wrote:
>
> Hi Marco,
>
> This doesn't look like a false positive KCSAN report, right?
> I am thinking about releasing this one to the mailing lists.

It's technically a data race, and if it didn't wipe the MM right after
the memcpy, there'd be a bug. But here even if it copies garbage, that
garbage will be wiped. Therefore, this is likely benign.

Here it reinitializes the MM:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/fork.c?id=4663747812d1a272312d1b95cbd128f0cdb329f2#n1473

Very likely that's the answer, and marking it with data_race() is
appropriate. Could be upstreamed with the above commentary, but I'd
keep it for now. I'll try to send it next week.

syzbot

unread,
Aug 12, 2025, 6:58:16 PM8/12/25
to el...@google.com, nog...@google.com, syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages