android_kernel_oneplus_msm8998/drivers/misc/mei
Dan Carpenter 24328b80de mei: bus: type promotion bug in mei_nfc_if_version()
commit b40b3e9358fbafff6a4ba0f4b9658f6617146f9c 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.

Cc: <stable@vger.kernel.org>
Fixes: 582ab27a063a ("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>
2018-09-26 08:35:10 +02:00
..
amthif.c mei: amthif: discard not read messages 2016-06-01 12:15:50 -07:00
bus-fixup.c mei: bus: type promotion bug in mei_nfc_if_version() 2018-09-26 08:35:10 +02:00
bus.c mei: bus: fix mei_cldev_enable KDoc 2017-01-12 11:22:47 +01:00
client.c mei: return error on notification request to a disconnected client 2017-11-08 10:06:30 +01:00
client.h mei: bus: export client protocol version 2015-09-20 19:30:10 -07:00
debugfs.c mei: Fix debugfs filename in error output 2015-10-27 14:21:42 +09:00
hbm.c mei: fix NULL dereferencing during FW initiated disconnection 2016-06-01 12:15:50 -07:00
hbm.h mei: me: d0i3: add d0i3 enter/exit state machine 2015-08-03 17:33:55 -07:00
hw-me-regs.h mei: me: add lewisburg device ids 2017-08-30 10:19:22 +02:00
hw-me.c mei: me: disable driver on SPT SPS firmware 2016-12-02 09:09:01 +01:00
hw-me.h mei: me: d0i3: enable d0i3 interrupts 2015-08-03 17:33:54 -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. 2016-11-10 16:36:33 +01:00
hw-txe.h mei: fix kernel-doc warnings 2014-09-29 11:56:02 -04:00
hw.h mei: hbm: bump supported HBM version to 2.0 2015-08-03 17:33:55 -07:00
init.c mei: cancel driver workers only after client devices were removed 2015-10-17 21:45:05 -07:00
interrupt.c mei: amthif: discard not read messages 2016-06-01 12:15:50 -07:00
Kconfig mei: fix compilation error with missing WATCHDOG_CORE 2014-02-14 10:13:46 -08:00
main.c mei: remove dev_err message on an unsupported ioctl 2018-04-08 11:52:00 +02:00
Makefile mei: bus: rename nfc.c to bus-fixup.c 2015-08-03 17:20:26 -07:00
mei-trace.c mei: me: add io register tracing 2015-03-01 19:36:59 -08:00
mei-trace.h mei: trace: remove unused TRACE_SYSTEM_STRING 2015-04-13 15:27:19 +02:00
mei_dev.h mei: amthif: discard not read messages 2016-06-01 12:15:50 -07:00
pci-me.c mei: me: allow runtime pm for platform with D0i3 2018-09-15 09:40:42 +02:00
pci-txe.c mei: txe: fix incorrect indentation 2015-05-24 11:13:49 -07:00
wd.c Watchdog: Fix parent of watchdog_devices 2015-09-09 21:39:22 +02:00