summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/modules.py
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-06-06 16:12:11 +0300
committerTzung-Bi Shih <tzungbi@kernel.org>2024-06-07 12:57:44 +0300
commit1f72dd046270ff44e5fd43045c4d0bb025f88607 (patch)
treefe86a678966d117ffed2c7b7ec2a907223bca7d1 /scripts/gdb/linux/modules.py
parent04ca0a51f1e63bd553fd4af8e9af0fe094fa4f0a (diff)
downloadlinux-1f72dd046270ff44e5fd43045c4d0bb025f88607.tar.xz
hwmon: (cros_ec) Prevent read overflow in probe()
The "resp.sensor_name" comes from cros_ec_cmd() and it hasn't necessarily been NUL terminated. We had not intended to read past "sensor_name_size" bytes, however, there is a width vs precision bug in the format string. The format needs to be precision '%.*s' instead of width '%*s'. Precision prevents an out of bounds read, but width is a no-op. Fixes: bc3e45258096 ("hwmon: add ChromeOS EC driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/42331b70-bd3c-496c-8c79-3ec4faad40b8@moroto.mountain Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions