]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: atm: ueagle-atm: add missing endpoint check
authorJohan Hovold <johan@kernel.org>
Tue, 10 Dec 2019 11:25:58 +0000 (12:25 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:35 +0000 (14:22 -0300)
commitd4b3204552fcd946396cc35efb3f7b5ae3eb1170
treec9e62a2fac5f3856525530ab97b0cc579405c8b2
parent8b5a8bf886922450846e1ceffd4e96c5a336ab18
USB: atm: ueagle-atm: add missing endpoint check

BugLink: https://bugs.launchpad.net/bugs/1857158
commit 09068c1ad53fb077bdac288869dec2435420bdc4 upstream.

Make sure that the interrupt interface has an endpoint before trying to
access its endpoint descriptors to avoid dereferencing a NULL pointer.

The driver binds to the interrupt interface with interface number 0, but
must not assume that this interface or its current alternate setting are
the first entries in the corresponding configuration arrays.

Fixes: b72458a80c75 ("[PATCH] USB: Eagle and ADI 930 usb adsl modem driver")
Cc: stable <stable@vger.kernel.org> # 2.6.16
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20191210112601.3561-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/usb/atm/ueagle-atm.c