summaryrefslogtreecommitdiff
path: root/fs/btrfs/async-thread.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-10-27 11:35:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-12 13:17:07 +0100
commit58478143771b20ab219937b1c30a706590a59224 (patch)
tree6b6fdf94308c9b001cccd3106890b2bbe8cdd589 /fs/btrfs/async-thread.c
parenta6af69768d5cb4b2528946d53be5fa19ade37723 (diff)
comedi: ni_usb6501: fix NULL-deref in command paths
commit 907767da8f3a925b060c740e0b5c92ea7dbec440 upstream. 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: stable@vger.kernel.org # 3.18 Cc: Luca Ellero <luca.ellero@brickedbrain.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20211027093529.30896-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/async-thread.c')
0 files changed, 0 insertions, 0 deletions