[v5.15] kernel BUG in clear_page_mlock

3 views
Skip to first unread message

syzbot

unread,
Mar 6, 2025, 12:05:27 AM3/6/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=100078b7980000
kernel config: https://syzkaller.appspot.com/x/.config?x=3ca28fba9b2e5c5
dashboard link: https://syzkaller.appspot.com/bug?extid=d520f32b2c8561ac1d17
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3f2947e5e4dc/disk-c16c81c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7034800fdaa8/vmlinux-c16c81c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/42337be7c213/Image-c16c81c8.gz.xz

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

head: 05ffc0000029080d ffff800020887c50 ffff800020887c50 ffff0000f2627111
head: 0000000400000200 0000000000000000 000000d3ffffffff ffff0000d3704000
page dumped because: VM_BUG_ON_PAGE(1 && PageTail(page))
------------[ cut here ]------------
kernel BUG at include/linux/page-flags.h:431!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 11136 Comm: syz.7.1596 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : TestClearPageMlocked include/linux/page-flags.h:431 [inline]
pc : clear_page_mlock+0x57c/0x64c mm/mlock.c:64
lr : TestClearPageMlocked include/linux/page-flags.h:431 [inline]
lr : clear_page_mlock+0x57c/0x64c mm/mlock.c:64
sp : ffff800020887340
x29: ffff800020887340 x28: 1ffff00004110eb0 x27: 1fffff80007e8979
x26: 1fffff80007e8979 x25: dfff800000000000 x24: 0000000000000000
x23: fffffc0003f40001 x22: 0000000000000001 x21: fffffc0003f40001
x20: fffffc0003f44bc8 x19: fffffc0003f44bc0 x18: 0000000000000002
x17: 0000000000000002 x16: ffff800008336568 x15: 00000000ffffffff
x14: ffff0000c0b89b40 x13: 0000000000000001 x12: 0000000000080000
x11: 0000000000022c8c x10: ffff80002f8d2000 x9 : 3eec4d7bb95c7300
x8 : 3eec4d7bb95c7300 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff8000208867b8 x4 : ffff800014c50660 x3 : ffff8000083366b4
x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000038
Call trace:
TestClearPageMlocked include/linux/page-flags.h:431 [inline]
clear_page_mlock+0x57c/0x64c mm/mlock.c:64
page_remove_rmap+0xbf8/0xfe8 mm/rmap.c:1375
try_to_migrate_one+0xd20/0x1178 mm/rmap.c:1938
rmap_walk_anon+0x2f4/0x4bc mm/rmap.c:2323
try_to_migrate+0x47c/0x570
__unmap_and_move mm/migrate.c:1072 [inline]
unmap_and_move mm/migrate.c:1218 [inline]
migrate_pages+0x19f8/0x3280 mm/migrate.c:1495
do_mbind mm/mempolicy.c:1325 [inline]
kernel_mbind mm/mempolicy.c:1472 [inline]
__do_sys_mbind mm/mempolicy.c:1479 [inline]
__se_sys_mbind mm/mempolicy.c:1475 [inline]
__arm64_sys_mbind+0x1004/0x13ac mm/mempolicy.c:1475
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: d004aa61 912f8021 aa1303e0 97ff47b5 (d4210000)
---[ end trace ac2e80eb53be290f ]---


---
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

syzbot

unread,
Mar 6, 2025, 2:24:25 AM3/6/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1301769b980000
kernel config: https://syzkaller.appspot.com/x/.config?x=3ca28fba9b2e5c5
dashboard link: https://syzkaller.appspot.com/bug?extid=d520f32b2c8561ac1d17
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10ce4254580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=115f9078580000
head: 05ffc0000029080d 0000000000000000 dead000000000122 ffff0000d5b62001
head: 0000000400000200 0000000000000000 00000144ffffffff ffff0000c08a4000
page dumped because: VM_BUG_ON_PAGE(1 && PageTail(page))
------------[ cut here ]------------
kernel BUG at include/linux/page-flags.h:431!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 4028 Comm: syz-executor357 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : TestClearPageMlocked include/linux/page-flags.h:431 [inline]
pc : clear_page_mlock+0x57c/0x64c mm/mlock.c:64
lr : TestClearPageMlocked include/linux/page-flags.h:431 [inline]
lr : clear_page_mlock+0x57c/0x64c mm/mlock.c:64
sp : ffff80001f9f71e0
x29: ffff80001f9f71e0 x28: 1ffff00003f3eec0 x27: 1fffff800071b5f9
x26: 1fffff800071b5f9 x25: dfff800000000000 x24: ffff0000c90d0000
x23: fffffc00038d8001 x22: 0000000000000001 x21: fffffc00038d8001
x20: fffffc00038dafc8 x19: fffffc00038dafc0 x18: 0000000000000002
x17: 0000000000000000 x16: ffff800011b4e3fc x15: 00000000ffffffff
x14: ffff0000caf49b40 x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000000001 x10: 0000000000000000 x9 : 04b31823e2a0dc00
x8 : 04b31823e2a0dc00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001f9f6658 x4 : ffff800014c50660 x3 : ffff8000085568c0
x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000038
Call trace:
TestClearPageMlocked include/linux/page-flags.h:431 [inline]
clear_page_mlock+0x57c/0x64c mm/mlock.c:64
page_remove_rmap+0xbf8/0xfe8 mm/rmap.c:1375
wp_page_copy+0x94c/0x12b8 mm/memory.c:3146
do_wp_page+0x6c4/0x9c4
handle_pte_fault mm/memory.c:4666 [inline]
__handle_mm_fault mm/memory.c:4783 [inline]
handle_mm_fault+0x1bdc/0x33a8 mm/memory.c:4881
faultin_page mm/gup.c:976 [inline]
__get_user_pages+0x39c/0x92c mm/gup.c:1197
__get_user_pages_locked mm/gup.c:1382 [inline]
__get_user_pages_remote+0x194/0x66c mm/gup.c:2007
pin_user_pages_remote+0x70/0x9c mm/gup.c:3104
process_vm_rw_single_vec mm/process_vm_access.c:105 [inline]
process_vm_rw_core mm/process_vm_access.c:215 [inline]
process_vm_rw+0x574/0xa38 mm/process_vm_access.c:283
__do_sys_process_vm_writev mm/process_vm_access.c:303 [inline]
__se_sys_process_vm_writev mm/process_vm_access.c:298 [inline]
__arm64_sys_process_vm_writev+0xdc/0xf8 mm/process_vm_access.c:298
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: d004aa61 912f8021 aa1303e0 97ff47b5 (d4210000)
---[ end trace 4ded2cc208f7e424 ]---


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