Benjamin Tissoires
2be683020b
Input: elan_i2c_smbus - fix corrupted stack
...
commit 40f7090bb1 upstream.
New ICs (like the one on the Lenovo T480s) answer to
ETP_SMBUS_IAP_VERSION_CMD 4 bytes instead of 3. This corrupts the stack
as i2c_smbus_read_block_data() uses the values returned by the i2c
device to know how many data it need to return.
i2c_smbus_read_block_data() can read up to 32 bytes (I2C_SMBUS_BLOCK_MAX)
and there is no safeguard on how many bytes are provided in the return
value. Ensure we always have enough space for any future firmware.
Also 0-initialize the values to prevent any access to uninitialized memory.
Cc: <stable@vger.kernel.org > # v4.4.x, v4.9.x, v4.14.x, v4.15.x, v4.16.x
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com >
Acked-by: KT Liao <kt.liao@emc.com.tw >
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-06-05 11:41:56 +02:00
..
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:31 +02:00
2018-05-01 12:58:21 -07:00
2018-05-01 12:58:20 -07:00
2018-05-30 07:51:54 +02:00
2018-05-16 10:10:29 +02:00
2018-02-07 11:12:20 -08:00
2018-05-30 07:52:41 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:36 +02:00
2018-05-25 16:17:42 +02:00
2018-01-10 09:31:19 +01:00
2018-05-30 07:52:34 +02:00
2018-05-30 07:52:36 +02:00
2018-05-25 16:17:55 +02:00
2018-05-30 07:52:06 +02:00
2018-05-30 07:52:38 +02:00
2017-12-25 14:26:30 +01:00
2018-05-25 16:17:46 +02:00
2017-12-20 10:10:34 +01:00
2018-04-12 12:32:13 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:37 +02:00
2018-03-19 08:42:47 +01:00
2018-04-19 08:56:20 +02:00
2017-11-02 11:10:55 +01:00
2018-04-24 09:36:29 +02:00
2018-04-26 11:02:03 +02:00
2018-05-30 07:52:34 +02:00
2017-11-02 11:10:55 +01:00
2018-05-01 12:58:24 -07:00
2017-08-28 17:15:16 +02:00
2018-05-16 10:10:26 +02:00
2018-05-30 07:52:42 +02:00
2018-04-26 11:02:10 +02:00
2017-11-02 11:10:55 +01:00
2018-04-19 08:56:16 +02:00
2018-05-30 07:52:34 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:32 +02:00
2018-05-30 07:52:31 +02:00
2018-05-30 07:52:34 +02:00
2017-11-04 15:01:50 +01:00
2018-03-28 18:24:49 +02:00
2018-05-30 07:52:32 +02:00
2018-06-05 11:41:56 +02:00
2018-05-30 07:52:30 +02:00
2018-05-09 09:51:56 +02:00
2017-11-02 11:10:55 +01:00
2018-03-19 08:42:50 +01:00
2017-12-20 10:10:38 +01:00
2018-05-30 07:52:27 +02:00
2017-12-14 09:53:12 +01:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:30 +02:00
2018-05-25 16:17:58 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-25 16:17:47 +02:00
2017-12-29 17:53:46 +01:00
2018-05-30 07:52:33 +02:00
2018-05-30 07:51:48 +02:00
2018-05-01 12:58:19 -07:00
2018-01-17 09:45:27 +01:00
2018-05-30 07:52:41 +02:00
2017-11-02 11:10:55 +01:00
2018-04-26 11:02:13 +02:00
2017-11-02 11:10:55 +01:00
2018-04-24 09:36:32 +02:00
2018-05-30 07:52:29 +02:00
2017-11-02 11:10:55 +01:00
2018-05-01 12:58:24 -07:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:28 +02:00
2018-04-08 14:26:31 +02:00
2018-06-05 11:41:55 +02:00
2018-05-30 07:52:39 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:36 +02:00
2018-06-05 11:41:55 +02:00
2018-05-09 09:51:55 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:38 +02:00
2017-09-08 18:26:51 -07:00
2017-11-02 11:10:55 +01:00
2018-04-24 09:36:34 +02:00
2017-12-14 09:53:08 +01:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:41 +02:00
2018-05-30 07:52:30 +02:00
2017-11-02 11:10:55 +01:00
2017-12-20 10:10:29 +01:00
2018-05-25 16:18:02 +02:00
2018-05-30 07:52:37 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:34 +02:00
2017-07-20 11:37:58 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:35 +02:00
2018-05-30 07:52:32 +02:00
2017-08-28 13:52:22 +02:00
2017-11-02 11:10:55 +01:00
2018-05-25 16:17:44 +02:00
2018-05-09 09:51:51 +02:00
2018-05-22 18:53:57 +02:00
2018-05-16 10:10:30 +02:00
2018-04-24 09:36:29 +02:00
2018-05-25 16:18:00 +02:00
2018-04-12 12:32:19 +02:00
2018-05-30 07:51:56 +02:00
2017-11-02 11:10:55 +01:00
2018-04-24 09:36:34 +02:00
2018-04-19 08:56:16 +02:00
2018-05-30 07:52:12 +02:00
2017-08-29 08:52:51 -05:00
2018-03-15 10:54:32 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:36 +02:00
2018-05-30 07:52:26 +02:00
2018-05-30 07:52:30 +02:00
2017-11-02 11:10:55 +01:00
2018-02-25 11:07:53 +01:00