]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xhci: xhci-mem: off by one in xhci_stream_id_to_ring()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Jul 2018 09:48:53 +0000 (12:48 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commitd3902a6a5cc29170b6532a333ff456bdb81ae923
treec6b7fc826b461f21d9dc6d653cf667931fe687bf
parentd5049d79ecab58e760a390d5ad91aa3521b2722e
xhci: xhci-mem: off by one in xhci_stream_id_to_ring()

BugLink: http://bugs.launchpad.net/bugs/1810554
commit 313db3d6488bb03b61b99de9dbca061f1fd838e1 upstream.

The > should be >= here so that we don't read one element beyond the end
of the ep->stream_info->stream_rings[] array.

Fixes: e9df17eb1408 ("USB: xhci: Correct assumptions about number of rings per endpoint.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.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/host/xhci-mem.c