[moderation] [mm?] KCSAN: data-race in mprotect_fixup / remove_migration_pte

0 views
Skip to first unread message

syzbot

unread,
Nov 21, 2024, 3:28:26 PM11/21/24
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 43fb83c17ba2 Merge tag 'soc-arm-6.13' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13d35930580000
kernel config: https://syzkaller.appspot.com/x/.config?x=508990cd52d85e0d
dashboard link: https://syzkaller.appspot.com/bug?extid=61e70862ec7c46649940
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0cfe5e243483/disk-43fb83c1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bf3db17c1a89/vmlinux-43fb83c1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ef78e473615e/bzImage-43fb83c1.xz

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

loop0: detected capacity change from 0 to 128
==================================================================
BUG: KCSAN: data-race in mprotect_fixup / remove_migration_pte

write to 0xffff888116501d40 of 8 bytes by task 12575 on cpu 0:
vm_flags_init include/linux/mm.h:874 [inline]
vm_flags_reset include/linux/mm.h:886 [inline]
mprotect_fixup+0x419/0x5e0 mm/mprotect.c:677
do_mprotect_pkey+0x653/0x960 mm/mprotect.c:838
__do_sys_mprotect mm/mprotect.c:859 [inline]
__se_sys_mprotect mm/mprotect.c:856 [inline]
__x64_sys_mprotect+0x48/0x60 mm/mprotect.c:856
x64_sys_call+0x2770/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:11
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888116501d40 of 8 bytes by task 12569 on cpu 1:
remove_migration_pte+0x678/0x9c0 mm/migrate.c:339
rmap_walk_anon+0x28f/0x440 mm/rmap.c:2635
rmap_walk+0x5b/0x70 mm/rmap.c:2713
remove_migration_ptes mm/migrate.c:373 [inline]
migrate_folio_move mm/migrate.c:1388 [inline]
migrate_pages_batch+0x1374/0x1910 mm/migrate.c:1898
migrate_pages_sync mm/migrate.c:1964 [inline]
migrate_pages+0xff1/0x1820 mm/migrate.c:2073
do_mbind mm/mempolicy.c:1390 [inline]
kernel_mbind mm/mempolicy.c:1533 [inline]
__do_sys_mbind mm/mempolicy.c:1607 [inline]
__se_sys_mbind+0xf76/0x1160 mm/mempolicy.c:1603
__x64_sys_mbind+0x78/0x90 mm/mempolicy.c:1603
x64_sys_call+0x2662/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:238
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000102077 -> 0x0000000000102071

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 12569 Comm: syz.0.2894 Not tainted 6.12.0-syzkaller-03657-g43fb83c17ba2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================


---
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
Reply all
Reply to author
Forward
0 new messages