]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit66f6c6581a487d7c3e007615eb48d9ecb84c5c08
tree0272ca2cbab49904ec9e22e35199ff47d49358b6
parentc4099e7e88621e82a5b3a5b0a2e3d6d8eee4e8e0
r8152: add missing endpoint sanity check

BugLink: https://bugs.launchpad.net/bugs/1862259
[ Upstream commit 86f3f4cd53707ceeec079b83205c8d3c756eca93 ]

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: 40a82917b1d3 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/usb/r8152.c