]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
USB: serial: mct_u232: fix modem-status error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:16 +0000 (14:56 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:46:32 +0000 (10:46 +0200)
commit4855936b417742b00607d4db7487fa7a28072388
treea4d1bd808ef23e152a901c9629ca2abed928207d
parent88810bcd15c376eeac6d393d69dae10463c3c69a
USB: serial: mct_u232: fix modem-status error handling

BugLink: http://bugs.launchpad.net/bugs/1691369
commit 36356a669eddb32917fc4b5c2b9b8bf80ede69de upstream.

Make sure to detect short control-message transfers so that errors are
logged when reading the modem status at open.

Note that while this also avoids initialising the modem status using
uninitialised heap data, these bits could not leak to user space as they
are currently not used.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/usb/serial/mct_u232.c