diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2021-06-07 11:23:07 -0400 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-08-26 08:35:34 -0400 |
commit | ba6c1b004ac5aaee418ce84acbecdc4d89a67bbe (patch) | |
tree | ce2b64638200e70ff83d4771b8f175db1337ff9b /drivers/usb/core/devio.c | |
parent | 8e100c72b6ded07d5900c20ca5ee5d0c6d9c4293 (diff) |
USB: core: Avoid WARNings for 0-length descriptor requests
[ Upstream commit 60dfe484cef45293e631b3a6e8995f1689818172 ]
The USB core has utility routines to retrieve various types of
descriptors. These routines will now provoke a WARN if they are asked
to retrieve 0 bytes (USB "receive" requests must not have zero
length), so avert this by checking the size argument at the start.
CC: Johan Hovold <johan@kernel.org>
Reported-and-tested-by: syzbot+7dbcd9ff34dc4ed45240@syzkaller.appspotmail.com
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20210607152307.GD1768031@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/usb/core/devio.c')
0 files changed, 0 insertions, 0 deletions