syzbot


WARNING in nsim_map_alloc_elem

Status: upstream: reported C repro on 2022/07/24 10:41
Reported-by: syzbot+ad24705d3fd6463b18c6@syzkaller.appspotmail.com
Fix commit: d0b80a9edb1a netdevsim: Avoid allocation warnings triggered from user space
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-arm64 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-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 201d, last: 176d

Cause bisection: failed (bisect log)

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3609 at mm/page_alloc.c:5402 __alloc_pages+0x39e/0x510 mm/page_alloc.c:5402
Modules linked in:
CPU: 0 PID: 3609 Comm: syz-executor427 Not tainted 5.19.0-rc5-syzkaller-01146-gb77ffb30cfc5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:__alloc_pages+0x39e/0x510 mm/page_alloc.c:5402
Code: ff ff 00 0f 84 33 fe ff ff 80 ce 01 e9 2b fe ff ff 83 fe 0a 0f 86 3e fd ff ff 80 3d d2 70 e9 0b 00 75 09 c6 05 c9 70 e9 0b 01 <0f> 0b 45 31 f6 e9 8d fe ff ff 65 ff 05 21 55 45 7e 48 c7 c0 a0 16
RSP: 0018:ffffc900030cf9c0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffff92000619f39 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 000000000000000b RDI: 0000000000000000
RBP: 0000000000140cc0 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 000000000000000b
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000400002
FS:  0000555556dfc300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000001b8ef000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2272
 kmalloc_order+0x34/0xf0 mm/slab_common.c:945
 kmalloc_order_trace+0x14/0x120 mm/slab_common.c:961
 kmalloc include/linux/slab.h:605 [inline]
 nsim_map_alloc_elem+0x119/0x2e0 drivers/net/netdevsim/bpf.c:357
 nsim_bpf_map_alloc drivers/net/netdevsim/bpf.c:512 [inline]
 nsim_bpf+0x8b3/0x1050 drivers/net/netdevsim/bpf.c:573
 bpf_map_offload_ndo+0x132/0x1e0 kernel/bpf/offload.c:359
 bpf_map_offload_map_alloc+0x243/0x450 kernel/bpf/offload.c:394
 find_and_alloc_map kernel/bpf/syscall.c:131 [inline]
 map_create kernel/bpf/syscall.c:1102 [inline]
 __sys_bpf+0x8b8/0x5750 kernel/bpf/syscall.c:4936
 __do_sys_bpf kernel/bpf/syscall.c:5058 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5056 [inline]
 __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:5056
 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+0x46/0xb0
RIP: 0033:0x7f1f9a4a1ba9
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffebe3a1e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fffebe3a1f8 RCX: 00007f1f9a4a1ba9
RDX: 0000000000000048 RSI: 0000000020000100 RDI: 0000000000000000
RBP: 0000000000000003 R08: bb1414ac00000000 R09: bb1414ac00000000
R10: bb1414ac00000000 R11: 0000000000000246 R12: 00007fffebe3a200
R13: 00007fffebe3a1f4 R14: 0000000000000003 R15: 0000000000000000
 </TASK>

Crashes (7):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-bpf-next-kasan-gce 2022/07/20 10:55 bpf-next b77ffb30cfc5 775344bc .config strace log report syz C WARNING in nsim_map_alloc_elem
ci-upstream-bpf-next-kasan-gce 2022/08/13 22:39 bpf-next ea2babac63d4 8dfcaa3d .config console log report info WARNING in nsim_map_alloc_elem
ci-upstream-bpf-next-kasan-gce 2022/08/13 22:33 bpf-next ea2babac63d4 8dfcaa3d .config console log report info WARNING in nsim_map_alloc_elem
ci-upstream-bpf-next-kasan-gce 2022/08/13 22:23 bpf-next ea2babac63d4 8dfcaa3d .config console log report info WARNING in nsim_map_alloc_elem
ci-upstream-bpf-next-kasan-gce 2022/08/07 00:27 bpf-next ea2babac63d4 88e3a122 .config console log report info WARNING in nsim_map_alloc_elem
ci-upstream-bpf-next-kasan-gce 2022/08/02 08:00 bpf-next ea2babac63d4 fef302b1 .config console log report info WARNING in nsim_map_alloc_elem
ci-upstream-bpf-next-kasan-gce 2022/07/20 10:35 bpf-next b77ffb30cfc5 775344bc .config console log report info WARNING in nsim_map_alloc_elem
* Struck through repros no longer work on HEAD.