linux/drivers/misc/mei
Dan Carpenter 5d5a6ad948 mei: bus: type promotion bug in mei_nfc_if_version()
commit b40b3e9358 upstream.

We accidentally removed the check for negative returns
without considering the issue of type promotion.
The "if_version_length" variable is type size_t so if __mei_cl_recv()
returns a negative then "bytes_recv" is type promoted
to a high positive value and treated as success.

Fixes: 582ab27a06 ("mei: bus: fix received data size check in NFC fixup")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-12-16 22:08:14 +00:00
..
amthif.c mei: fix format string in debug prints 2016-05-01 00:05:49 +02:00
bus.c mei: bus: fix possible boundaries violation 2014-10-30 09:40:13 -07:00
client.c mei: move write cb to completion on credentials failures 2017-03-16 02:26:49 +00:00
client.h mei: client.h fix checkpatch errors 2014-03-17 15:57:43 -07:00
debugfs.c mei: export active connections to debugfs 2014-02-07 15:09:35 -08:00
hbm.c mei: fix memory leak of mei_clients array 2014-05-27 14:15:25 -07:00
hbm.h mei: fix memory leak of mei_clients array 2014-05-27 14:15:25 -07:00
hw-me-regs.h mei: me: introduce power gating registers 2014-05-03 19:20:23 -04:00
hw-me.c mei: me: release hw from reset only during the reset flow 2015-03-02 13:17:06 +00:00
hw-me.h mei: me: move probe quirk to cfg structure 2014-05-27 14:16:38 -07:00
hw-txe-regs.h mei: extract fw status registers 2014-05-03 19:21:22 -04:00
hw-txe.c mei: txe: don't clean an unprocessed interrupt cause. 2017-02-23 03:54:20 +00:00
hw-txe.h mei: add per device configuration 2014-05-27 14:16:38 -07:00
hw.h mei: me: bump hbm version to 1.1 to support power gating 2014-05-03 19:20:25 -04:00
init.c mei: make device disabled on stop unconditionally 2015-03-18 15:06:06 +00:00
interrupt.c mei: fix format string in debug prints 2016-05-01 00:05:49 +02:00
Kconfig mei: fix compilation error with missing WATCHDOG_CORE 2014-02-14 10:13:46 -08:00
main.c mei: fix format string in debug prints 2016-05-01 00:05:49 +02:00
Makefile mei: txe: add Kbuild for TXE device 2014-02-07 15:08:46 -08:00
mei_dev.h mei: fix possible integer overflow issue 2016-05-01 00:05:49 +02:00
nfc.c mei: bus: type promotion bug in mei_nfc_if_version() 2018-12-16 22:08:14 +00:00
pci-me.c mei: don't schedule suspend in pm idle 2014-09-05 16:36:27 -07:00
pci-txe.c mei: don't schedule suspend in pm idle 2014-09-05 16:36:27 -07:00
wd.c mei: set connecting state just upon connection request is sent to the fw 2014-05-03 19:21:56 -04:00