[PATCH] mfd: mt6370: add bounds checking to regmap_read/write functions
Andy Shevchenko
andy.shevchenko at gmail.com
Thu Aug 18 23:27:13 PDT 2022
On Fri, Aug 19, 2022 at 8:25 AM Dan Carpenter <dan.carpenter at oracle.com> wrote:
>
> It looks like there are a potential out of bounds accesses in the
> read/write() functions. Also can "len" be negative? Let's check for
> that too.
...
> Fixes: ab9905c5e38e ("mfd: mt6370: Add MediaTek MT6370 support")
> From static analysis. This code is obviously harmless however it may
> not be required. The regmap range checking is slightly complicated and
> I haven't remembered where all it's done.
Exactement! I do not think this Fixes anything, I believe you are
adding a dead code. So, can you do deeper analysis?
--
With Best Regards,
Andy Shevchenko
More information about the Linux-mediatek
mailing list