syzbot


KASAN: slab-out-of-bounds Read in ld_usb_read (3)

Status: fixed on 2019/11/06 12:39
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+6fe95b826644f7f12b0b@syzkaller.appspotmail.com
Fix commit: 7a6f22d7479b USB: ldusb: fix read info leaks
First crash: 1644d, last: 1632d
Duplicate bugs (2)
duplicates (2):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
BUG: bad usercopy in ld_usb_read (3) hardening mm usb C 46 1632d 1643d 0/26 closed as dup on 2019/10/18 06:28
KMSAN: uninit-value in ld_usb_read (2) usb C 8 1634d 1642d 0/26 closed as dup on 2019/10/18 14:57
Discussions (10)
Title Replies (including bot) Last reply
[PATCH 3.16 000/136] 3.16.80-rc1 review 140 (140) 2019/12/23 14:00
[PATCH 4.19 00/93] 4.19.81-stable review 107 (107) 2019/11/09 15:53
[PATCH 4.14 000/119] 4.14.151-stable review 132 (132) 2019/11/01 18:48
[PATCH 4.9 00/49] 4.9.198-stable review 55 (55) 2019/10/29 15:17
[PATCH 4.4 00/41] 4.4.198-stable review 52 (52) 2019/10/29 13:29
[PATCH 5.3 000/197] 5.3.8-stable review 203 (203) 2019/10/29 13:03
[PATCH v2 0/2] USB: ldusb: fix ring-buffer bugs 8 (8) 2019/10/21 18:30
[PATCH 0/2] USB: ldusb: fix ring-buffer bugs 4 (4) 2019/10/18 15:03
BUG: bad usercopy in ld_usb_read (3) 2 (3) 2019/10/18 06:28
KASAN: slab-out-of-bounds Read in ld_usb_read (3) 2 (4) 2019/10/17 10:46
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ld_usb_read (2) usb 58 1645d 1673d 0/26 closed as dup on 2019/09/17 12:20
upstream KASAN: slab-out-of-bounds Read in ld_usb_read usb C 57 1687d 1709d 0/26 closed as dup on 2019/08/12 12:23
Last patch testing requests (1)
Created Duration User Patch Repo Result
2019/10/17 10:25 19m johan@kernel.org patch https://github.com/google/kasan.git 22be26f7 OK

Sample crash report:
ldusb 1-1:0.28: Read buffer overflow, -131386010882048 bytes dropped
==================================================================
BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x124/0x150 lib/usercopy.c:28
Read of size 2147479552 at addr ffff8881cf7e0008 by task syz-executor992/1738

CPU: 1 PID: 1738 Comm: syz-executor992 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0xca/0x13e lib/dump_stack.c:113
 print_address_description.constprop.0+0x36/0x50 mm/kasan/report.c:374
 __kasan_report.cold+0x1a/0x33 mm/kasan/report.c:506
 kasan_report+0xe/0x20 mm/kasan/common.c:634
 check_memory_region_inline mm/kasan/generic.c:185 [inline]
 check_memory_region+0x128/0x190 mm/kasan/generic.c:192
 _copy_to_user+0x124/0x150 lib/usercopy.c:28
 copy_to_user include/linux/uaccess.h:152 [inline]
 ld_usb_read+0x329/0x760 drivers/usb/misc/ldusb.c:492
 __vfs_read+0x76/0x100 fs/read_write.c:425
 vfs_read+0x1ea/0x430 fs/read_write.c:461
 ksys_read+0x1e8/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:0x44adf9
Code: e8 bc b4 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0b cc fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f1ceda23d98 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00000000006dcc68 RCX: 000000000044adf9
RDX: 00000000ffffffe9 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00000000006dcc60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc6c
R13: 0001002402090100 R14: 000048c920200f11 R15: 08983baa00000112

The buggy address belongs to the page:
page:ffffea00073df800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0
flags: 0x200000000010000(head)
raw: 0200000000010000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881cf7f5500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881cf7f5580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881cf7f5600: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
                   ^
 ffff8881cf7f5680: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff8881cf7f5700: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
==================================================================

Crashes (74):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/17 02:18 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report syz C ci2-upstream-usb
2019/10/17 01:37 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report syz C ci2-upstream-usb
2019/10/16 05:54 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d4ea592f .config console log report syz C ci2-upstream-usb
2019/10/27 19:28 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/27 16:55 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/27 09:45 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/27 07:07 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/27 06:01 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/27 04:49 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/27 03:33 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/26 17:16 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 25bb509e .config console log report ci2-upstream-usb
2019/10/26 03:20 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 413926c5 .config console log report ci2-upstream-usb
2019/10/25 21:26 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 04ca72cd .config console log report ci2-upstream-usb
2019/10/25 05:01 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d01bb02a .config console log report ci2-upstream-usb
2019/10/25 02:28 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d01bb02a .config console log report ci2-upstream-usb
2019/10/24 21:08 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d01bb02a .config console log report ci2-upstream-usb
2019/10/24 09:21 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d01bb02a .config console log report ci2-upstream-usb
2019/10/24 02:13 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 b602d64b .config console log report ci2-upstream-usb
2019/10/23 19:58 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 b602d64b .config console log report ci2-upstream-usb
2019/10/23 17:36 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 b602d64b .config console log report ci2-upstream-usb
2019/10/23 11:58 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d0686497 .config console log report ci2-upstream-usb
2019/10/23 07:32 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d0686497 .config console log report ci2-upstream-usb
2019/10/23 05:35 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d0686497 .config console log report ci2-upstream-usb
2019/10/23 00:00 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 4ee855e7 .config console log report ci2-upstream-usb
2019/10/22 19:58 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 4ee855e7 .config console log report ci2-upstream-usb
2019/10/22 13:38 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 c59a7cd8 .config console log report ci2-upstream-usb
2019/10/22 07:50 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 c59a7cd8 .config console log report ci2-upstream-usb
2019/10/22 05:35 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 c59a7cd8 .config console log report ci2-upstream-usb
2019/10/22 03:40 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 c59a7cd8 .config console log report ci2-upstream-usb
2019/10/21 21:20 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 b24d2b8a .config console log report ci2-upstream-usb
2019/10/21 19:20 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 b24d2b8a .config console log report ci2-upstream-usb
2019/10/21 19:15 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 b24d2b8a .config console log report ci2-upstream-usb
2019/10/21 17:07 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 b24d2b8a .config console log report ci2-upstream-usb
2019/10/21 11:46 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/20 23:00 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/20 19:12 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/20 18:23 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/20 17:09 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/20 16:23 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/20 10:13 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/20 02:16 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 14:00 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 11:50 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 09:28 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 08:01 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 07:07 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 06:06 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 05:40 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/19 05:24 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 22:56 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 20:02 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 17:23 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 14:42 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 13:54 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 10:34 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 06:59 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 02:15 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/18 01:36 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/17 19:40 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/17 19:19 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/17 14:41 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/17 12:08 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/17 04:43 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/17 02:59 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/16 21:54 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 8c88c9c1 .config console log report ci2-upstream-usb
2019/10/16 13:32 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d4ea592f .config console log report ci2-upstream-usb
2019/10/16 13:17 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d4ea592f .config console log report ci2-upstream-usb
2019/10/16 05:20 https://github.com/google/kasan.git usb-fuzzer 22be26f76193 d4ea592f .config console log report ci2-upstream-usb
* Struck through repros no longer work on HEAD.