syzbot


WARNING: kmalloc bug in relay_open_buf

Status: fixed on 2018/02/26 20:04
Subsystems: block trace
[Documentation on labels]
Reported-by: syzbot+7525b19f9531f76b8b1e@syzkaller.appspotmail.com
Fix commit: 88913bd8ea2a kernel/relay.c: limit kmalloc size to KMALLOC_MAX_SIZE
First crash: 2294d, last: 2278d
Discussions (1)
Title Replies (including bot) Last reply
WARNING: kmalloc bug in relay_open_buf 2 (3) 2018/02/07 04:57

Sample crash report:
audit: type=1400 audit(1518105396.157:7): avc:  denied  { map } for  pid=4212 comm="syzkaller515149" path="/root/syzkaller515149686" 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: 4212 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: 4212 Comm: syzkaller515149 Not tainted 4.15.0+ #302
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/0x257 lib/dump_stack.c:53
 panic+0x1e4/0x41c kernel/panic.c:183
 __warn+0x1dc/0x200 kernel/panic.c:547
 report_bug+0x211/0x2d0 lib/bug.c:184
 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+0x22/0x40 arch/x86/entry/entry_64.S:988
RIP: 0010:kmalloc_slab+0x5d/0x70 mm/slab_common.c:1012
RSP: 0018:ffff8801b2177510 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8801b213c2c0 RCX: ffffffff81726d07
RDX: 1ffff100364dfa02 RSI: 0000000000000000 RDI: 0000000040d80008
RBP: ffff8801b2177510 R08: 1ffff1003642ee19 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801b26fd010
R13: 0000000000000000 R14: 00000000014000c0 R15: ffffffff868bab20
 __do_kmalloc mm/slab.c:3700 [inline]
 __kmalloc+0x25/0x760 mm/slab.c:3714
 kmalloc include/linux/slab.h:517 [inline]
 relay_create_buf kernel/relay.c:172 [inline]
 relay_open_buf.part.10+0xc8/0x9b0 kernel/relay.c:449
 relay_open_buf kernel/relay.c:446 [inline]
 relay_open+0x57a/0xa40 kernel/relay.c:596
 do_blk_trace_setup+0x4a4/0xcd0 kernel/trace/blktrace.c:544
 __blk_trace_setup+0xbe/0x150 kernel/trace/blktrace.c:589
 blk_trace_ioctl+0x206/0x2e0 kernel/trace/blktrace.c:728
 blkdev_ioctl+0x1845/0x1e00 block/ioctl.c:587
 block_ioctl+0xde/0x120 fs/block_dev.c:1860
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x26/0x9b
RIP: 0033:0x443e79
RSP: 002b:00007ffefdf1a1c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443e79
RDX: 0000000020872000 RSI: 00000000c0481273 RDI: 0000000000000003
RBP: 00000000006ce018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000401b20
R13: 0000000000401bb0 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/02/08 15:58 upstream 581e400ff935 9fb5ec43 .config console log report syz C ci-upstream-kasan-gce
2018/02/06 18:02 upstream e237f98a9c13 66c15deb .config console log report syz C ci-upstream-kasan-gce
2018/02/22 11:16 upstream af3e79d29555 04cbdbd1 .config console log report ci-upstream-kasan-gce
2018/02/19 04:43 upstream 0e06fb5b9ac8 833f78c7 .config console log report ci-upstream-kasan-gce
2018/02/18 12:05 upstream c786427f57b6 833f78c7 .config console log report ci-upstream-kasan-gce
2018/02/12 08:57 upstream 7928b2cbe55b 4e9b726d .config console log report ci-upstream-kasan-gce
2018/02/08 12:37 upstream 581e400ff935 9fb5ec43 .config console log report ci-upstream-kasan-gce
2018/02/07 20:38 upstream a2e5790d8416 9fb5ec43 .config console log report ci-upstream-kasan-gce
2018/02/07 17:24 upstream a2e5790d8416 9fb5ec43 .config console log report ci-upstream-kasan-gce
2018/02/07 06:31 upstream cbd7b8a76b79 66c15deb .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.