syzbot


BUG: unable to handle kernel paging request in dummy_set_vf_spoofchk

Status: fixed on 2019/12/16 09:09
Reported-by: syzbot+f3a94f2f3741010ca13e@syzkaller.appspotmail.com
Fix commit: 9ed49fc95f37 net: rtnetlink: prevent underflows in do_setvfinfo()
First crash: 1907d, last: 1796d
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(1563654677.872:36): avc:  denied  { map } for  pid=6920 comm="syz-executor132" path="/root/syz-executor132896962" 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
BUG: unable to handle kernel paging request at fffffffc40001810
IP: dummy_set_vf_spoofchk+0x7a/0xb0 /drivers/net/dummy.c:219
PGD 766d067 P4D 766d067 PUD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 6920 Comm: syz-executor132 Not tainted 4.14.133 #28
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880978f8200 task.stack: ffff888084040000
RIP: 0010:dummy_set_vf_spoofchk+0x7a/0xb0 /drivers/net/dummy.c:219
RSP: 0018:ffff8880840472b0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: fffffffc40001800 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000d8000100 RDI: fffffffc40001810
RBP: ffff8880840472c8 R08: 1ffff11010808e99 R09: ffff8880840474c8
R10: ffffed1010808ea5 R11: ffff88808404752f R12: ffff8880a19ee7c0
R13: 0000000000000000 R14: ffff888084047610 R15: ffff8880928ac368
FS:  0000000000726880(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffc40001810 CR3: 00000000969d1000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 do_setvfinfo /net/core/rtnetlink.c:1855 [inline]
 do_setlink+0x1834/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:0x440259
RSP: 002b:00007ffe8d9eb298 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440259
RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401ae0
R13: 0000000000401b70 R14: 0000000000000000 R15: 0000000000000000
Code: 48 8d 1c d0 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 10 48 89 fa 48 c1 ea 03 0f b6 04 02 48 89 fa 83 e2 07 38 d0 7f 04 84 c0 75 16 <44> 88 6b 10 45 31 e4 e8 3a ad b8 fd 44 89 e0 5b 41 5c 41 5d 5d 
RIP: dummy_set_vf_spoofchk+0x7a/0xb0 /drivers/net/dummy.c:219 RSP: ffff8880840472b0
CR2: fffffffc40001810
---[ end trace b75eaf0c40c178af ]---

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/20 20:34 linux-4.14.y aea8526edf59 1656845f .config console log report syz C ci2-linux-4-14
2019/11/09 13:14 linux-4.14.y c9fda4f22428 1e35461e .config console log report ci2-linux-4-14
2019/09/30 05:51 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/08/10 14:20 linux-4.14.y 3ffe1e79c174 acb51638 .config console log report ci2-linux-4-14
2019/08/08 10:59 linux-4.14.y b19ffe6e7205 e6ebef88 .config console log report ci2-linux-4-14
2019/07/31 05:42 linux-4.14.y ff33472c282e 7c7ded69 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.