syzbot


WARNING: kmalloc bug in xdp_umem_create

Status: fixed on 2018/07/09 18:05
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+4abadc5d69117b346506@syzkaller.appspotmail.com
Fix commit: a343993c518c xsk: silence warning on memory allocation failure
First crash: 2153d, last: 2146d
Discussions (3)
Title Replies (including bot) Last reply
Re: [PATCH] bfs: add sanity check at bfs_fill_super(). 18 (18) 2018/06/15 10:45
WARNING: kmalloc bug in xdp_umem_create 8 (9) 2018/06/12 12:08
[PATCH bpf] xsk: silence warning on memory allocation failure 3 (3) 2018/06/11 22:44
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: kmalloc bug in xdp_umem_create (2) bpf net C done 21 811d 877d 22/26 fixed on 2023/02/24 13:51

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
WARNING: CPU: 1 PID: 4537 at mm/slab_common.c:996 kmalloc_slab+0x56/0x70 mm/slab_common.c:996
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 4537 Comm: syz-executor849 Not tainted 4.17.0+ #92
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1b9/0x294 lib/dump_stack.c:113
 panic+0x22f/0x4de kernel/panic.c:184
 __warn.cold.8+0x163/0x1b3 kernel/panic.c:536
 report_bug+0x252/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:992
RIP: 0010:kmalloc_slab+0x56/0x70 mm/slab_common.c:996
Code: c5 c0 ca d0 88 5d c3 b8 10 00 00 00 48 85 ff 74 f4 83 ef 01 c1 ef 03 0f b6 87 e0 c9 d0 88 eb d8 31 c0 81 e6 00 02 00 00 75 db <0f> 0b 5d c3 48 8b 04 c5 00 ca d0 88 5d c3 66 90 66 2e 0f 1f 84 00 
RSP: 0018:ffff8801acc67998 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff877abea2
RDX: 1ffff10035e17ce3 RSI: 0000000000000000 RDI: 0000000001000010
RBP: ffff8801acc67998 R08: ffff8801d91d82c0 R09: ffffed0035e17cd9
R10: ffffed0035e17cd9 R11: ffff8801af0be6cb R12: dffffc0000000000
R13: 0000000020000000 R14: ffff8801af0be6b0 R15: 00000000006080c0
 __do_kmalloc mm/slab.c:3713 [inline]
 __kmalloc+0x25/0x760 mm/slab.c:3727
 kmalloc_array include/linux/slab.h:634 [inline]
 kcalloc include/linux/slab.h:645 [inline]
 xdp_umem_pin_pages net/xdp/xdp_umem.c:205 [inline]
 xdp_umem_reg net/xdp/xdp_umem.c:318 [inline]
 xdp_umem_create+0x5c9/0x10f0 net/xdp/xdp_umem.c:349
 xsk_setsockopt+0x443/0x550 net/xdp/xsk.c:531
 __sys_setsockopt+0x1bd/0x390 net/socket.c:1935
 __do_sys_setsockopt net/socket.c:1946 [inline]
 __se_sys_setsockopt net/socket.c:1943 [inline]
 __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1943
 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43fce9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 6b 45 00 00 c3 66 2e 0f 1f 84 00 00 00 00 
RSP: 002b:00007ffedcafaac8 EFLAGS: 00000213 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fce9
RDX: 0000000000000004 RSI: 000000000000011b RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000018 R09: 00000000004002c8
R10: 0000000020000040 R11: 0000000000000213 R12: 0000000000401610
R13: 00000000004016a0 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/06/09 15:03 upstream 7d3bf613e99a 866118af .config console log report syz C ci-upstream-kasan-gce-root
2018/06/15 22:07 upstream 4c5e8fc62d6a 27c5f59f .config console log report ci-upstream-kasan-gce-root
2018/06/15 09:55 upstream b5d903c2d656 27c5f59f .config console log report ci-upstream-kasan-gce-root
2018/06/14 02:08 upstream be779f03d563 27c5f59f .config console log report ci-upstream-kasan-gce-root
2018/06/10 23:57 upstream 3ca24ce9ff76 866118af .config console log report ci-upstream-kasan-gce-root
2018/06/10 09:24 upstream a16afaf7928b 866118af .config console log report ci-upstream-kasan-gce-root
2018/06/09 13:33 upstream 7d3bf613e99a 866118af .config console log report ci-upstream-kasan-gce-root
* Struck through repros no longer work on HEAD.