syzbot


WARNING: kmalloc bug in memdup_user (3)

Status: fixed on 2018/07/09 18:05
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+0f92a17b0706231d0a09@syzkaller.appspotmail.com
Fix commit: 683d2ac3904c bpf: fix sock hashmap kmalloc warning
First crash: 2205d, last: 2203d
Discussions (1)
Title Replies (including bot) Last reply
WARNING: kmalloc bug in memdup_user (3) 1 (2) 2018/06/15 20:24
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: kmalloc bug in memdup_user (2) rdma 1 2255d 2255d 5/26 fixed on 2018/05/14 10:29
upstream WARNING: kmalloc bug in memdup_user rdma C 441 2258d 2275d 4/26 fixed on 2018/03/23 18:14

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)
WARNING: CPU: 0 PID: 4531 at mm/slab_common.c:996 kmalloc_slab+0x56/0x70 mm/slab_common.c:996
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 4531 Comm: syz-executor594 Not tainted 4.17.0-rc3+ #9
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+0x1de/0x490 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:992
RIP: 0010:kmalloc_slab+0x56/0x70 mm/slab_common.c:996
RSP: 0018:ffff8801ad4b7c48 EFLAGS: 00010246
RAX: 0000000000000000 RBX: fffffffffffffff4 RCX: ffffffff8185e678
RDX: ffffffff8185e6eb RSI: 0000000000000000 RDI: 00000000fffffffd
RBP: ffff8801ad4b7c48 R08: ffff8801adb3e2c0 R09: ffffed0035ba1f08
R10: ffffed0035ba1f08 R11: ffff8801add0f843 R12: 00000000fffffffd
R13: 0000000020000240 R14: 00000000ffffffff R15: 00000000014200c0
 __do_kmalloc mm/slab.c:3713 [inline]
 __kmalloc_track_caller+0x21/0x760 mm/slab.c:3733
 memdup_user+0x2c/0xa0 mm/util.c:160
 map_delete_elem+0x21b/0x4e0 kernel/bpf/syscall.c:796
 __do_sys_bpf kernel/bpf/syscall.c:2128 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:2096 [inline]
 __x64_sys_bpf+0x33f/0x4f0 kernel/bpf/syscall.c:2096
 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43fd89
RSP: 002b:00007ffe3ad9ad78 EFLAGS: 00000213 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fd89
RDX: 0000000000000010 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000213 R12: 00000000004016b0
R13: 0000000000401740 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (137):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/05/15 21:25 bpf-next c5c7d7f3c451 68ce85f1 .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/05/17 02:15 bpf-next 44edef77bd92 a367c1d7 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 22:58 bpf-next 44edef77bd92 a367c1d7 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 21:40 bpf-next 44edef77bd92 a367c1d7 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 08:02 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 08:00 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 06:24 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 06:15 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 05:25 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 05:22 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 05:12 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 04:58 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 04:21 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 04:20 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 04:12 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 04:11 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 04:01 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 03:28 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 03:17 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 03:03 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 02:39 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 02:32 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 02:23 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 02:11 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 02:02 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 01:58 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 01:56 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 01:47 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 01:17 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 01:10 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 00:31 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 00:29 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 00:23 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/16 00:06 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 23:31 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 23:13 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 23:10 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 22:36 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 22:17 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 22:04 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 21:58 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 21:52 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
2018/05/15 21:09 bpf-next c5c7d7f3c451 68ce85f1 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.