syzbot


kernel BUG in hugepage_add_anon_rmap

Status: upstream: reported on 2022/03/01 13:57
Reported-by: syzbot+d7ed29a6231d3747fb31@syzkaller.appspotmail.com
Fix commit: 4eecb8b9163d mm/migrate: Convert remove_migration_ptes() to folios
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 123d, last: 123d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in rmap_walk_file 3 241d 330d 0/22 auto-closed as invalid on 2022/01/28 16:17
linux-4.19 kernel BUG in do_page_add_anon_rmap 1 385d 385d 0/1 auto-closed as invalid on 2021/10/06 19:06

Sample crash report:
------------[ cut here ]------------
kernel BUG at mm/rmap.c:2330!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4289 Comm: syz-executor.0 Not tainted 5.17.0-rc5-next-20220222-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:hugepage_add_anon_rmap+0x1f5/0x240 mm/rmap.c:2330
Code: 89 ef e8 6e ad f8 ff 0f 0b e8 77 b2 c4 ff 48 83 eb 01 e9 a6 fe ff ff e8 69 b2 c4 ff 48 83 eb 01 e9 ff fe ff ff e8 5b b2 c4 ff <0f> 0b e8 54 b2 c4 ff 0f 0b e8 4d b2 c4 ff 49 8d 6c 24 ff eb b4 48
RSP: 0018:ffffc9000fa8f9b8 EFLAGS: 00010216
RAX: 0000000000002b78 RBX: 0000000000000000 RCX: ffffc90003bd1000
RDX: 0000000000040000 RSI: ffffffff81b47f75 RDI: 0000000000000003
RBP: ffffea0001008040 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff81b47eab R11: 0000000000000000 R12: ffff88801e231210
R13: 0000000020400000 R14: ffff8880738f8700 R15: 0000000000000000
FS:  00007f1a19594700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f33cc0df300 CR3: 000000001ca70000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 remove_migration_pte+0x5fd/0xc50 mm/migrate.c:234
 rmap_walk_anon+0x44b/0x9e0 mm/rmap.c:2236
 rmap_walk+0x92/0xd0 mm/rmap.c:2302
 remove_migration_ptes mm/migrate.c:271 [inline]
 unmap_and_move_huge_page mm/migrate.c:1259 [inline]
 migrate_pages+0x1709/0x4030 mm/migrate.c:1379
 do_mbind mm/mempolicy.c:1334 [inline]
 kernel_mbind+0x4d7/0x7d0 mm/mempolicy.c:1481
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f1a18489059
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1a19594168 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007f1a1859c030 RCX: 00007f1a18489059
RDX: 0000000000000000 RSI: 0000000000800000 RDI: 0000000020001000
RBP: 00007f1a184e308d R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe5da8cc9f R14: 00007f1a19594300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:hugepage_add_anon_rmap+0x1f5/0x240 mm/rmap.c:2330
Code: 89 ef e8 6e ad f8 ff 0f 0b e8 77 b2 c4 ff 48 83 eb 01 e9 a6 fe ff ff e8 69 b2 c4 ff 48 83 eb 01 e9 ff fe ff ff e8 5b b2 c4 ff <0f> 0b e8 54 b2 c4 ff 0f 0b e8 4d b2 c4 ff 49 8d 6c 24 ff eb b4 48
RSP: 0018:ffffc9000fa8f9b8 EFLAGS: 00010216
RAX: 0000000000002b78 RBX: 0000000000000000 RCX: ffffc90003bd1000
RDX: 0000000000040000 RSI: ffffffff81b47f75 RDI: 0000000000000003
RBP: ffffea0001008040 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff81b47eab R11: 0000000000000000 R12: ffff88801e231210
R13: 0000000020400000 R14: ffff8880738f8700 R15: 0000000000000000
FS:  00007f1a19594700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f33cc0df300 CR3: 000000001ca70000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2022/02/25 13:36 linux-next 196d330d7fb1 7c337266 .config log report info kernel BUG in hugepage_add_anon_rmap
ci-upstream-linux-next-kasan-gce-root 2022/02/25 13:25 linux-next 196d330d7fb1 7c337266 .config log report info kernel BUG in hugepage_add_anon_rmap