]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: serial: io_edgeport: handle unbound ports on URB completion
authorJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 09:50:23 +0000 (10:50 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commita868ee196583ab63d975f75e1f5a260c33cc166c
tree4c69ad8beb75e8d2d5c5f5d969cb4fb893a4c547
parentd95df1eb8f387ff3ad0b7a259fd6885d8c1f52f3
USB: serial: io_edgeport: handle unbound ports on URB completion

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

Check for NULL port data in the shared interrupt and bulk completion
callbacks to avoid dereferencing a NULL pointer in case a device sends
data for a port device which isn't bound to a driver (e.g. due to a
malicious device having unexpected endpoints or after an allocation
failure on port probe).

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: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/serial/io_edgeport.c