syzbot


BUG: unable to handle kernel paging request in dummy_set_vf_rate

Status: fixed on 2019/12/09 13:28
Reported-by: syzbot+520b63963f39a34c80ca@syzkaller.appspotmail.com
Fix commit: 9ed49fc95f37 net: rtnetlink: prevent underflows in do_setvfinfo()
First crash: 1707d, last: 1692d
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)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
audit: type=1400 audit(1567725518.079:36): avc:  denied  { map } for  pid=6862 comm="syz-executor041" path="/root/syz-executor041712434" 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 fffffffbb11e5804
IP: dummy_set_vf_rate+0x99/0x110 drivers/net/dummy.c:206
PGD 766d067 P4D 766d067 PUD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 6862 Comm: syz-executor041 Not tainted 4.14.141 #37
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88807ff36380 task.stack: ffff8880970e0000
RIP: 0010:dummy_set_vf_rate+0x99/0x110 drivers/net/dummy.c:206
RSP: 0018:ffff8880970e72a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffbb11e57f8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000d20bee55 RDI: fffffffbb11e5804
RBP: ffff8880970e72c8 R08: 1ffff11012e1ce99 R09: ffff8880970e74c8
R10: ffffed1012e1cea5 R11: ffff8880970e752f R12: ffff8880a1a5cb40
R13: 0000000000000000 R14: 000000007005f108 R15: fffffffbb11e57f8
FS:  00000000008df880(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffbb11e5804 CR3: 0000000083b36000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 do_setvfinfo net/core/rtnetlink.c:1843 [inline]
 do_setlink+0x1755/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/0x640 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:00007ffd962d2be8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440239
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401ac0
R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000
Code: df 49 8d 7f 0c 48 89 fa 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 04 84 d2 75 52 48 b8 00 00 00 00 00 fc ff df <66> 45 89 77 0c 49 03 9c 24 c0 0a 00 00 48 8d 7b 0e 48 89 fa 48 
RIP: dummy_set_vf_rate+0x99/0x110 drivers/net/dummy.c:206 RSP: ffff8880970e72a0
CR2: fffffffbb11e5804
---[ end trace 931eb1e77397f135 ]---

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/05 23:22 linux-4.14.y 01fd1694b93c bf6bcce4 .config console log report syz C ci2-linux-4-14
2019/09/20 17:28 linux-4.14.y b10ab5e2c476 d96e88f3 .config console log report ci2-linux-4-14
2019/09/05 22:58 linux-4.14.y 01fd1694b93c bf6bcce4 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.