]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: serial: ir-usb: add missing endpoint sanity check
authorJohan Hovold <johan@kernel.org>
Wed, 22 Jan 2020 10:15:26 +0000 (11:15 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 6 Mar 2020 07:13:20 +0000 (02:13 -0500)
commit6c6b45390d9b516a056b8570bcb52c2df4c22f46
tree3e9b6f53fe995e0f26499a69897a74f8e0738b6f
parente0e7cbd4f6a2ba77911b050dd0402450f12ed748
USB: serial: ir-usb: add missing endpoint sanity check

BugLink: https://bugs.launchpad.net/bugs/1864904
commit 2988a8ae7476fe9535ab620320790d1714bdad1d upstream.

Add missing endpoint sanity check to avoid dereferencing a NULL-pointer
on open() in case a device lacks a bulk-out endpoint.

Note that prior to commit f4a4cbb2047e ("USB: ir-usb: reimplement using
generic framework") the oops would instead happen on open() if the
device lacked a bulk-in endpoint and on write() if it lacked a bulk-out
endpoint.

Fixes: f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
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/usb/serial/ir-usb.c