syzbot


BUG: unable to handle kernel paging request in dummy_get_vf_config

Status: fixed on 2019/12/13 17:54
Reported-by: syzbot+2e8f8d5c2c736c83d62f@syzkaller.appspotmail.com
Fix commit: 9ed49fc95f37 net: rtnetlink: prevent underflows in do_setvfinfo()
First crash: 1299d, last: 1201d

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(1563518749.892:36): avc:  denied  { map } for  pid=6824 comm="syz-executor589" path="/root/syz-executor589571637" dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
device dummy0 entered promiscuous mode
BUG: unable to handle kernel paging request at fffffff850000000
IP: memcpy_erms+0x6/0x10 /arch/x86/lib/memcpy_64.S:54
PGD 766d067 P4D 766d067 PUD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 6824 Comm: syz-executor589 Not tainted 4.14.133 #28
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a5a4c1c0 task.stack: ffff88807ff58000
RIP: 0010:memcpy_erms+0x6/0x10 /arch/x86/lib/memcpy_64.S:54
RSP: 0018:ffff88807ff5f278 EFLAGS: 00010246
RAX: ffff88807ff5f45c RBX: ffff88807ff5f458 RCX: 0000000000000006
RDX: 0000000000000006 RSI: fffffff850000000 RDI: ffff88807ff5f45c
RBP: ffff88807ff5f298 R08: 1ffff1100ffebe8b R09: ffffed100ffebe8d
R10: ffffed100ffebe8c R11: ffff88807ff5f461 R12: 0000000000000006
R13: ffff88807ff5f45c R14: fffffff850000000 R15: ffff8880930232e8
FS:  0000000000734880(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffff850000000 CR3: 000000008fe05000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 memcpy /./include/linux/string.h:347 [inline]
 dummy_get_vf_config+0x9a/0x560 /drivers/net/dummy.c:257
 do_setvfinfo /net/core/rtnetlink.c:1825 [inline]
 do_setlink+0x156b/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:0x440289
RSP: 002b:00007ffe773ccf58 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440289
RDX: 0000000000000000 RSI: 000000002000a000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401b10
R13: 0000000000401ba0 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: ffff88807ff5f278
CR2: fffffff850000000
---[ end trace fe2268206658b9c8 ]---

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-linux-4-14 2019/07/19 06:48 linux-4.14.y aea8526edf59 7bb222f7 .config console log report syz C
ci2-linux-4-14 2019/10/24 17:18 linux-4.14.y b98aebd29824 d01bb02a .config console log report
ci2-linux-4-14 2019/08/25 19:57 linux-4.14.y b5260801526c d21c5d9d .config console log report
ci2-linux-4-14 2019/08/12 09:13 linux-4.14.y 3ffe1e79c174 acb51638 .config console log report
* Struck through repros no longer work on HEAD.