syzbot


WARNING in nsim_map_alloc_elem

Status: fixed on 2023/02/24 13:50
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+ad24705d3fd6463b18c6@syzkaller.appspotmail.com
Fix commit: d0b80a9edb1a netdevsim: Avoid allocation warnings triggered from user space
First crash: 586d, last: 561d
Cause bisection: failed (error log, bisect log)
  
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 5.4 000/389] 5.4.211-rc1 review 396 (396) 2022/10/26 16:43
[PATCH 5.15 000/779] 5.15.61-rc1 review 804 (804) 2022/09/23 09:30
[PATCH 5.10 000/545] 5.10.137-rc1 review 570 (570) 2022/08/29 08:17
[PATCH 4.19 000/287] 4.19.256-rc1 review 298 (298) 2022/08/25 10:11
[PATCH 5.18 0000/1095] 5.18.18-rc1 review 1101 (1101) 2022/08/21 13:22
[PATCH 5.19 0000/1157] 5.19.2-rc1 review 1184 (1184) 2022/08/21 08:05
[PATCH bpf] netdevsim: avoid allocation warnings triggered from user space 2 (2) 2022/07/29 22:10
[syzbot] WARNING in nsim_map_alloc_elem 0 (1) 2022/07/24 10:41

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