https://github.com/torvalds/linux
Revision 3ce17cd2b94907f6d91b81b32848044b84c97606 authored by Cristian Marussi on 15 July 2020, 12:13:38 UTC, committed by Guenter Roeck on 15 July 2020, 14:08:21 UTC
SMATCH detected a potential buffer overflow in the manipulation of
hwmon_attributes array inside the scmi_hwmon_probe function:

drivers/hwmon/scmi-hwmon.c:226
 scmi_hwmon_probe() error: buffer overflow 'hwmon_attributes' 6 <= 9

Fix it by statically declaring the size of the array as the maximum
possible as defined by hwmon_max define.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20200715121338.GA18761@e119603-lin.cambridge.arm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 8a03746
History
Tip revision: 3ce17cd2b94907f6d91b81b32848044b84c97606 authored by Cristian Marussi on 15 July 2020, 12:13:38 UTC
hwmon: (scmi) Fix potential buffer overflow in scmi_hwmon_probe()
Tip revision: 3ce17cd
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 15.8 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.8 KB
.mailmap -rw-r--r-- 15.4 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 97.4 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 547.9 KB
Makefile -rw-r--r-- 60.4 KB
README -rw-r--r-- 727 bytes

README

back to top