Skip to content
Snippets Groups Projects
Commit 0439ce5a authored by Yiyuan Guo's avatar Yiyuan Guo Committed by Greg Kroah-Hartman
Browse files

iio: cros_ec: Fix the allocation size for cros_ec_command


commit 8a462905 upstream.

The struct cros_ec_command contains several integer fields and a
trailing array. An allocation size neglecting the integer fields can
lead to buffer overrun.

Reviewed-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: default avatarYiyuan Guo <yguoaz@gmail.com>
Fixes: 974e6f02 ("iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub.")
Link: https://lore.kernel.org/r/20230630143719.1513906-1-yguoaz@gmail.com


Cc: <Stable@vger.kerenl.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aa425ee2
No related branches found
No related tags found
2 merge requests!185🤖 Sync Bot: Update v5.10-ktn to Latest Stable Kernel (v5.10.234),!172🤖 Sync Bot: Update v5.10-ktn to Latest Stable Kernel (v5.10.230)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment