diff options
author | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-10-06 00:17:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-09 16:13:42 +0200 |
commit | 81f7567c51ad97668d1c3a48e8ecc482e64d4161 (patch) | |
tree | b6ff61e20dad90a6bb9af8bb420ffd71e26a8d90 /.clang-format | |
parent | selftests: usbip: add wait after attach and before checking port status (diff) | |
download | linux-81f7567c51ad97668d1c3a48e8ecc482e64d4161.tar.xz linux-81f7567c51ad97668d1c3a48e8ecc482e64d4161.zip |
usb: usbip: Fix BUG: KASAN: slab-out-of-bounds in vhci_hub_control()
vhci_hub_control() accesses port_status array with out of bounds port
value. Fix it to reference port_status[] only with a valid rhport value
when invalid_rhport flag is true.
The invalid_rhport flag is set early on after detecting in port value
is within the bounds or not.
The following is used reproduce the problem and verify the fix:
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ed8ab6400000
Reported-by: syzbot+bccc1fe10b70fadc78d0@syzkaller.appspotmail.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions