]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: fix memory corruption in ioctl
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 19 Aug 2022 05:20:36 +0000 (08:20 +0300)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 22 Aug 2022 06:56:45 +0000 (06:56 +0000)
commit264ea5e30450217fd53e16f9d130626540beb037
tree316b17ad4b9ece0d4aa10d59bec0ce4ce94cb2be
parent66830c04e2f594310297ac6e05717490af6a8c2b
platform/chrome: fix memory corruption in ioctl

If "s_mem.bytes" is larger than the buffer size it leads to memory
corruption.

Fixes: 9629437ae5ad ("mfd / platform: cros_ec: Miscellaneous character device to talk with the EC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/Yv8dpCFZJdbUT5ye@kili
drivers/platform/chrome/cros_ec_chardev.c