syzbot


WARNING in usercopy_warn

Status: fixed on 2018/02/12 17:26
Subsystems: hardening mm
[Documentation on labels]
Reported-by: syzbot+e2d6cfb305e9f3911dea@syzkaller.appspotmail.com
Fix commit: 79a8a642bf05 net: Whitelist the skbuff_head_cache "cb" field
First crash: 2461d, last: 2439d
Duplicate bugs (2)
duplicates (2):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
WARNING: bad usercopy in put_cmsg hardening mm C 160 2434d 2438d 0/28 closed as dup on 2018/02/06 17:34
WARNING: bad usercopy in put_cmsg_compat hardening mm C 3 2437d 2438d 0/28 closed as dup on 2018/02/08 03:20
Discussions (4)
Title Replies (including bot) Last reply
[PATCH] net: Whitelist the skbuff_head_cache "cb" field 4 (4) 2018/02/08 21:04
[PATCH v2] socket: Provide put_cmsg_whitelist() for constant size copies 6 (6) 2018/02/06 18:42
[PATCH] socket: Provide bounce buffer for constant sized put_cmsg() 3 (3) 2018/02/02 06:34
WARNING in usercopy_warn 2 (3) 2018/01/31 10:16

Sample crash report:
device syz0 entered promiscuous mode
------------[ cut here ]------------
Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLAB object 'skbuff_head_cache' (offset 64, size 16)!
WARNING: CPU: 0 PID: 3663 at mm/usercopy.c:81 usercopy_warn+0xdb/0x100 mm/usercopy.c:76
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 3663 Comm: syzkaller694156 Not tainted 4.15.0-rc7-next-20180115+ #97
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:1085
RIP: 0010:usercopy_warn+0xdb/0x100 mm/usercopy.c:76
RSP: 0018:ffff8801d99df548 EFLAGS: 00010282
RAX: dffffc0000000008 RBX: ffffffff865cf19f RCX: ffffffff815aba6e
RDX: 0000000000000000 RSI: 1ffff1003b33be2e RDI: 1ffff1003b33be64
RBP: ffff8801d99df5a0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000003e6 R11: 0000000000000000 R12: ffffffff86200d00
R13: ffffffff85d2cfc0 R14: 0000000000000040 R15: 0000000000000010
 __check_heap_object+0x89/0xc0 mm/slab.c:4426
 check_heap_object mm/usercopy.c:236 [inline]
 __check_object_size+0x272/0x530 mm/usercopy.c:259
 check_object_size include/linux/thread_info.h:112 [inline]
 check_copy_size include/linux/thread_info.h:143 [inline]
 copy_to_user include/linux/uaccess.h:154 [inline]
 put_cmsg+0x233/0x3f0 net/core/scm.c:242
 sock_recv_errqueue+0x200/0x3e0 net/core/sock.c:2913
 packet_recvmsg+0xb2e/0x17a0 net/packet/af_packet.c:3296
 sock_recvmsg_nosec net/socket.c:803 [inline]
 sock_recvmsg+0xc9/0x110 net/socket.c:810
 ___sys_recvmsg+0x2a4/0x640 net/socket.c:2179
 __sys_recvmmsg+0x2a9/0xaf0 net/socket.c:2287
 SYSC_recvmmsg net/socket.c:2368 [inline]
 SyS_recvmmsg+0xc4/0x160 net/socket.c:2352
 entry_SYSCALL_64_fastpath+0x29/0xa0
RIP: 0033:0x444339
RSP: 002b:00007ffdb359d7d8 EFLAGS: 00000203 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000444339
RDX: 0000000000000001 RSI: 0000000020ef7fc4 RDI: 0000000000000005
RBP: 00000000006ce018 R08: 0000000020000000 R09: 0000000000000001
R10: 0000000000002000 R11: 0000000000000203 R12: 0000000000402020
R13: 00000000004020b0 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (171):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/15 15:06 linux-next b625c1ff8227 66d492a6 .config console log report syz C ci-upstream-next-kasan-gce
2018/02/06 13:20 upstream e237f98a9c13 a1bc9d40 .config console log report ci-upstream-kasan-gce
2018/02/04 10:52 upstream 617aebe6a97e 632a8c2c .config console log report ci-upstream-kasan-gce
2018/02/04 10:51 upstream 617aebe6a97e 632a8c2c .config console log report ci-upstream-kasan-gce
2018/02/04 10:45 upstream 617aebe6a97e 632a8c2c .config console log report ci-upstream-kasan-gce
2018/02/04 10:45 upstream 617aebe6a97e 632a8c2c .config console log report ci-upstream-kasan-gce
2018/02/05 18:49 upstream 35277995e179 a1bc9d40 .config console log report ci-upstream-kasan-gce-386
2018/02/05 07:26 upstream 35277995e179 a1bc9d40 .config console log report ci-upstream-kasan-gce-386
2018/02/04 21:29 upstream 617aebe6a97e a1bc9d40 .config console log report ci-upstream-kasan-gce-386
2018/02/04 12:04 upstream 617aebe6a97e a1bc9d40 .config console log report ci-upstream-kasan-gce-386
2018/02/04 12:02 upstream 617aebe6a97e a1bc9d40 .config console log report ci-upstream-kasan-gce-386
2018/02/06 13:46 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 13:24 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 13:02 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 12:32 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 12:18 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 12:15 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 12:09 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 11:55 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 11:37 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 10:57 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 10:21 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 09:57 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 09:24 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 08:08 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 08:00 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 07:14 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 06:15 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 05:21 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 04:40 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 04:01 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 03:50 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 03:38 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 03:34 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 03:29 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 03:13 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 03:02 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 02:48 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 02:48 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 01:48 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
2018/02/06 01:20 net-next-old 617aebe6a97e a1bc9d40 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.