[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200715130043.GA28391@bogus>
Date: Wed, 15 Jul 2020 14:00:43 +0100
From: Sudeep Holla <sudeep.holla@....com>
To: Cristian Marussi <cristian.marussi@....com>
Cc: linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
jdelvare@...e.com, linux@...ck-us.net,
Sudeep Holla <sudeep.holla@....com>
Subject: Re: [RESEND][PATCH] hwmon: scmi: fix potential buffer overflow in
scmi_hwmon_probe()
On Wed, Jul 15, 2020 at 01:13:38PM +0100, Cristian Marussi wrote:
> 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.
>
Makes sense to me,
Reviewed-by: Sudeep Holla <sudeep.holla@....com>
There may be other such instances. I am not sure if Guenter has ignored
them intentionally or just no one has fixed them so far.
--
Regards,
Sudeep
Powered by blists - more mailing lists