]> git.baikalelectronics.ru Git - kernel.git/commit
r8152: add missing endpoint sanity check
authorJohan Hovold <johan@kernel.org>
Tue, 14 Jan 2020 08:27:29 +0000 (09:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jan 2020 02:43:21 +0000 (18:43 -0800)
commitdf5ee46b73fb35024cf721b32d928ff99fe247a9
treefc0ca9cf35e8a6cf065344a9548e3a3ade6bf31e
parentfcbfe33d06cee4a0a3e333a10a2b7613a73b1796
r8152: add missing endpoint sanity check

Add missing endpoint sanity check to probe in order to prevent a
NULL-pointer dereference (or slab out-of-bounds access) when retrieving
the interrupt-endpoint bInterval on ndo_open() in case a device lacks
the expected endpoints.

Fixes: f5859f6e3744 ("net/usb/r8152: enable interrupt transfer")
Cc: hayeswang <hayeswang@realtek.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c