diff options
author | Johan Hovold <[email protected]> | 2021-10-27 11:35:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-10-30 10:54:47 +0200 |
commit | 907767da8f3a925b060c740e0b5c92ea7dbec440 (patch) | |
tree | 8e0ea076a5c5d3899c1ece7f30aa2cba8a73fa7a /drivers/usb/cdns3/cdns3-trace.c | |
parent | 28eb3b363df76cb5fdffc5ef0498ca7dcedea4e7 (diff) |
comedi: ni_usb6501: fix NULL-deref in command paths
The driver uses endpoint-sized USB transfer buffers but had no sanity
checks on the sizes. This can lead to zero-size-pointer dereferences or
overflowed transfer buffers in ni6501_port_command() and
ni6501_counter_command() if a (malicious) device has smaller max-packet
sizes than expected (or when doing descriptor fuzz testing).
Add the missing sanity checks to probe().
Fixes: a03bb00e50ab ("staging: comedi: add NI USB-6501 support")
Cc: [email protected] # 3.18
Cc: Luca Ellero <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions