syzbot


WARNING: kmalloc bug in memdup_user

Status: fixed on 2018/03/23 18:14
Subsystems: rdma
[Documentation on labels]
Reported-by: syzbot+a38b0e9f694c379ca7ce@syzkaller.appspotmail.com
Fix commit: 6a21dfc0d0db RDMA/ucma: Limit possible option size
First crash: 2321d, last: 2305d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 3.16 000/410] 3.16.57-rc1 review 426 (426) 2018/11/12 17:42
[PATCH 3.2 000/153] 3.2.102-rc1 review 155 (155) 2018/05/30 22:14
[PATCH 4.4 00/63] 4.4.122-stable review 79 (79) 2018/04/06 07:51
[PATCH 4.9 00/86] 4.9.88-stable review 97 (97) 2018/03/22 17:47
[PATCH 4.15 000/146] 4.15.10-stable review 160 (160) 2018/03/15 10:19
[PATCH 4.14 000/140] 4.14.27-stable review 150 (150) 2018/03/14 18:26
WARNING: kmalloc bug in memdup_user 4 (5) 2018/03/07 12:29
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: kmalloc bug in memdup_user (3) bpf C 137 2250d 2250d 8/27 fixed on 2018/07/09 18:05
upstream WARNING: kmalloc bug in memdup_user (2) rdma 1 2301d 2301d 5/27 fixed on 2018/05/14 10:29

Sample crash report:
audit: type=1400 audit(1520671159.284:6): avc:  denied  { map } for  pid=4224 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
audit: type=1400 audit(1520671188.895:7): avc:  denied  { map } for  pid=4241 comm="syzkaller643123" path="/root/syzkaller643123986" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
WARNING: CPU: 1 PID: 4241 at mm/slab_common.c:1012 kmalloc_slab+0x5d/0x70 mm/slab_common.c:1012
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 4241 Comm: syzkaller643123 Not tainted 4.16.0-rc4+ #348
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x24d lib/dump_stack.c:53
 panic+0x1e4/0x41c kernel/panic.c:183
 __warn+0x1dc/0x200 kernel/panic.c:547
 report_bug+0x1f4/0x2b0 lib/bug.c:186
 fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
 fixup_bug arch/x86/kernel/traps.c:247 [inline]
 do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986
RIP: 0010:kmalloc_slab+0x5d/0x70 mm/slab_common.c:1012
RSP: 0018:ffff8801a97cf970 EFLAGS: 00010246
RAX: 0000000000000000 RBX: fffffffffffffff4 RCX: ffffffff819733eb
RDX: ffffffff8423426f RSI: 0000000000000000 RDI: 00000000ffde933e
RBP: ffff8801a97cf970 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff88613380 R11: 0000000000000000 R12: 00000000ffde933e
R13: 0000000020000000 R14: 00000000014200c0 R15: ffff8801a97cfa68
 __do_kmalloc mm/slab.c:3700 [inline]
 __kmalloc_track_caller+0x21/0x760 mm/slab.c:3720
 memdup_user+0x2c/0x90 mm/util.c:160
 ucma_set_option+0x11f/0x4d0 drivers/infiniband/core/ucma.c:1297
 ucma_write+0x2d6/0x3d0 drivers/infiniband/core/ucma.c:1627
 __vfs_write+0xef/0x970 fs/read_write.c:480
 vfs_write+0x189/0x510 fs/read_write.c:544
 SYSC_write fs/read_write.c:589 [inline]
 SyS_write+0xef/0x220 fs/read_write.c:581
 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x43fdc9
RSP: 002b:00007ffe85188138 EFLAGS: 00000217 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fdc9
RDX: 0000000000000020 RSI: 0000000020000c80 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000217 R12: 00000000004016f0
R13: 0000000000401780 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (441):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/10 08:41 upstream cdb06e9d8f52 36d1c454 .config console log report syz C ci-upstream-kasan-gce
2018/03/06 20:18 upstream ce380619fab9 c8a18476 .config console log report syz C ci-upstream-kasan-gce
2018/03/06 19:34 upstream ce380619fab9 c8a18476 .config console log report syz C ci-upstream-kasan-gce
2018/03/06 19:35 upstream ce380619fab9 c8a18476 .config console log report syz ci-upstream-kasan-gce-386
2018/03/23 10:55 upstream c4f4d2f91772 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/23 05:42 upstream c4f4d2f91772 2e9d9054 .config console log report ci-upstream-kasan-gce
2018/03/22 12:40 upstream 3215b9d57a2c 95c88d7a .config console log report ci-upstream-kasan-gce
2018/03/22 10:56 upstream 3215b9d57a2c 95c88d7a .config console log report ci-upstream-kasan-gce
2018/03/21 16:24 upstream 3215b9d57a2c f63eeee9 .config console log report ci-upstream-kasan-gce
2018/03/21 11:13 upstream 3215b9d57a2c 113a43ff .config console log report ci-upstream-kasan-gce
2018/03/21 09:12 upstream 3215b9d57a2c 113a43ff .config console log report ci-upstream-kasan-gce
2018/03/21 00:47 upstream 1b5f3ba415fe 113a43ff .config console log report ci-upstream-kasan-gce
2018/03/20 19:24 upstream 1b5f3ba415fe 72c33b66 .config console log report ci-upstream-kasan-gce
2018/03/20 08:57 upstream 1b5f3ba415fe 7e7d7ed2 .config console log report ci-upstream-kasan-gce
2018/03/20 07:10 upstream 1b5f3ba415fe 7e7d7ed2 .config console log report ci-upstream-kasan-gce
2018/03/19 12:31 upstream c698ca527893 7e7d7ed2 .config console log report ci-upstream-kasan-gce
2018/03/19 07:05 upstream 9e1909b9da04 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/19 02:27 upstream 9e1909b9da04 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/18 17:49 upstream 8f5fd927c3a7 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/18 12:58 upstream 8f5fd927c3a7 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/18 07:24 upstream 8f5fd927c3a7 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/18 02:20 upstream 8f5fd927c3a7 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/17 21:56 upstream 8f5fd927c3a7 08dacaa0 .config console log report ci-upstream-kasan-gce
2018/03/13 03:46 upstream fc6eabbbf8ef f505ca4b .config console log report ci-upstream-kasan-gce
2018/03/10 17:25 upstream cdb06e9d8f52 36d1c454 .config console log report ci-upstream-kasan-gce
2018/03/09 17:51 upstream 1b88accf6a65 36d1c454 .config console log report ci-upstream-kasan-gce
2018/03/08 23:55 upstream 1b88accf6a65 acd0caa5 .config console log report ci-upstream-kasan-gce
2018/03/08 13:52 upstream 1b88accf6a65 acd0caa5 .config console log report ci-upstream-kasan-gce
2018/03/08 02:54 upstream 851710a80961 d50edb7e .config console log report ci-upstream-kasan-gce
2018/03/07 15:27 upstream 86f84779d8e9 a5e76540 .config console log report ci-upstream-kasan-gce
2018/03/07 08:36 upstream 86f84779d8e9 c8a18476 .config console log report ci-upstream-kasan-gce
2018/03/07 04:50 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce
2018/03/07 03:38 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce
2018/03/07 03:35 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce
2018/03/07 03:02 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce
2018/03/07 02:40 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce
2018/03/07 01:39 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce
2018/03/19 00:15 upstream 9e1909b9da04 08dacaa0 .config console log report ci-upstream-kasan-gce-386
2018/03/10 14:58 upstream cdb06e9d8f52 36d1c454 .config console log report ci-upstream-kasan-gce-386
2018/03/09 08:44 upstream 1b88accf6a65 36d1c454 .config console log report ci-upstream-kasan-gce-386
2018/03/07 03:59 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce-386
2018/03/07 03:12 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce-386
2018/03/07 02:47 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce-386
2018/03/07 01:39 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce-386
2018/03/07 01:34 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce-386
2018/03/06 18:58 upstream ce380619fab9 c8a18476 .config console log report ci-upstream-kasan-gce-386
* Struck through repros no longer work on HEAD.