syzbot


BUG: unable to handle kernel paging request in dummy_set_vf_mac

Status: fixed on 2019/12/12 17:16
Reported-by: syzbot+2e39499100150402de63@syzkaller.appspotmail.com
Fix commit: 9ed49fc95f37 net: rtnetlink: prevent underflows in do_setvfinfo()
First crash: 1742d, last: 1669d
Fix bisection: fixed by (bisect log) :
commit 9ed49fc95f37a457d940324c033c20d85cefb930
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed Nov 20 12:34:38 2019 +0000

  net: rtnetlink: prevent underflows in do_setvfinfo()

  

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
audit: type=1400 audit(1564512735.703:36): avc:  denied  { map } for  pid=6914 comm="syz-executor489" path="/root/syz-executor489930808" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
BUG: unable to handle kernel paging request at fffffffca6900000
IP: memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:54
PGD 766d067 P4D 766d067 PUD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 6914 Comm: syz-executor489 Not tainted 4.14.134 #30
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88807ced4080 task.stack: ffff8880a96a0000
RIP: 0010:memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:54
RSP: 0018:ffff8880a96a7278 EFLAGS: 00010246
RAX: fffffffca6900000 RBX: ffffffffdc460000 RCX: 0000000000000006
RDX: 0000000000000006 RSI: ffff8880909c9a70 RDI: fffffffca6900000
RBP: ffff8880a96a7298 R08: 1fffffff94d20000 R09: fffffbff94d20001
R10: fffffbff94d20000 R11: fffffffca6900005 R12: 0000000000000006
R13: fffffffca6900000 R14: ffff8880909c9a70 R15: ffff8880909c9a68
FS:  000000000171d880(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffca6900000 CR3: 000000007d011000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 memcpy include/linux/string.h:347 [inline]
 dummy_set_vf_mac+0xdf/0x120 drivers/net/dummy.c:179
 do_setvfinfo net/core/rtnetlink.c:1772 [inline]
 do_setlink+0x1098/0x2d50 net/core/rtnetlink.c:2135
 rtnl_setlink+0x225/0x320 net/core/rtnetlink.c:2303
 rtnetlink_rcv_msg+0x3eb/0xb70 net/core/rtnetlink.c:4285
 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432
 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4297
 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
 netlink_unicast+0x45d/0x780 net/netlink/af_netlink.c:1312
 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xce/0x110 net/socket.c:656
 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062
 __sys_sendmsg+0xb9/0x140 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x2d/0x50 net/socket.c:2103
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440239
RSP: 002b:00007ffce5a7d748 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440239
RDX: 0000000000000000 RSI: 000000002000a000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401ac0
R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000
Code: 90 90 90 90 90 eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 
RIP: memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:54 RSP: ffff8880a96a7278
CR2: fffffffca6900000
---[ end trace 034e1b80a99f64ad ]---

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/30 18:54 linux-4.14.y ff33472c282e f28bf2a5 .config console log report syz C ci2-linux-4-14
2019/10/11 13:31 linux-4.14.y 42327896f194 1a3bad90 .config console log report ci2-linux-4-14
2019/08/17 02:23 linux-4.14.y 45f092f9e9cb 8fd428a1 .config console log report ci2-linux-4-14
2019/08/06 03:49 linux-4.14.y 7d80e1218adf 6affd8e8 .config console log report ci2-linux-4-14
2019/07/30 18:32 linux-4.14.y ff33472c282e f28bf2a5 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.