syzbot


BUG: bad usercopy in read_rio

Status: fixed on 2019/10/27 22:28
Subsystems: hardening mm
[Documentation on labels]
Reported-by: syzbot+43e923a8937c203e9954@syzkaller.appspotmail.com
Fix commit: 015664d15270 USB: rio500: Remove Rio 500 kernel driver
First crash: 1691d, last: 1688d
Discussions (1)
Title Replies (including bot) Last reply
BUG: bad usercopy in read_rio 1 (2) 2019/10/10 15:36

Sample crash report:
usb 2-1: Rio opened.
usercopy: Kernel memory exposure attempt detected from wrapped address (offset 0, size 18446612689052408289)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
invalid opcode: 0000 [#1] SMP KASAN
CPU: 0 PID: 4860 Comm: syz-executor.1 Not tainted 5.4.0-rc1+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:usercopy_abort+0xb9/0xbb mm/usercopy.c:99
Code: e8 42 55 d6 ff 49 89 d9 4d 89 e8 4c 89 e1 41 56 48 89 ee 48 c7 c7 00 d8 cd 85 ff 74 24 08 41 57 48 8b 54 24 20 e8 b6 e6 c0 ff <0f> 0b e8 16 55 d6 ff e8 11 8c fd ff 8b 54 24 04 49 89 d8 4c 89 e1
RSP: 0018:ffff8881c9857c60 EFLAGS: 00010282
RAX: 000000000000006d RBX: ffffffff85cdd520 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8128bf9d RDI: ffffed103930af7e
RBP: ffffffff85cdd6e0 R08: 000000000000006d R09: fffffbfff11b25c0
R10: fffffbfff11b25bf R11: ffffffff88d92dff R12: ffffffff85cdd880
R13: ffffffff85cdd520 R14: ffff8881a02e99e1 R15: ffffffff85cdd520
FS:  00007f2e54e0e700(0000) GS:ffff8881db200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001b57fd0 CR3: 00000001cb0c5000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 check_bogus_address mm/usercopy.c:152 [inline]
 __check_object_size mm/usercopy.c:266 [inline]
 __check_object_size.cold+0xb2/0xbb mm/usercopy.c:256
 check_object_size include/linux/thread_info.h:119 [inline]
 check_copy_size include/linux/thread_info.h:150 [inline]
 copy_to_user include/linux/uaccess.h:151 [inline]
 read_rio+0x223/0x47c drivers/usb/misc/rio500.c:423
 __vfs_read+0x76/0x100 fs/read_write.c:425
 vfs_read+0x1ea/0x430 fs/read_write.c:461
 ksys_read+0x127/0x250 fs/read_write.c:587
 do_syscall_64+0xb7/0x580 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459a59
Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f2e54e0dc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459a59
RDX: 00000000000000ee RSI: 0000000020000140 RDI: 0000000000000004
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2e54e0e6d4
R13: 00000000004c70d5 R14: 00000000004dc948 R15: 00000000ffffffff
Modules linked in:
---[ end trace e9a389ed2c3494fc ]---
RIP: 0010:usercopy_abort+0xb9/0xbb mm/usercopy.c:99
Code: e8 42 55 d6 ff 49 89 d9 4d 89 e8 4c 89 e1 41 56 48 89 ee 48 c7 c7 00 d8 cd 85 ff 74 24 08 41 57 48 8b 54 24 20 e8 b6 e6 c0 ff <0f> 0b e8 16 55 d6 ff e8 11 8c fd ff 8b 54 24 04 49 89 d8 4c 89 e1
RSP: 0018:ffff8881c9857c60 EFLAGS: 00010282
RAX: 000000000000006d RBX: ffffffff85cdd520 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8128bf9d RDI: ffffed103930af7e
RBP: ffffffff85cdd6e0 R08: 000000000000006d R09: fffffbfff11b25c0
R10: fffffbfff11b25bf R11: ffffffff88d92dff R12: ffffffff85cdd880
R13: ffffffff85cdd520 R14: ffff8881a02e99e1 R15: ffffffff85cdd520
FS:  00007f2e54e0e700(0000) GS:ffff8881db200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001b57fd0 CR3: 00000001cb0c5000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/12 20:29 https://github.com/google/kasan.git usb-fuzzer 58d5f26a5584 426631dd .config console log report ci2-upstream-usb
2019/10/09 10:56 https://github.com/google/kasan.git usb-fuzzer 58d5f26a5584 312c6a5a .config console log report ci2-upstream-usb
* Struck through repros no longer work on HEAD.