Re: [PATCH 2/2] software node: Correct a OOB check in software_node_get_reference_args()

From: Andy Shevchenko
Date: Tue Apr 15 2025 - 02:42:35 EST


On Mon, Apr 14, 2025 at 07:12:27PM +0800, Zijun Hu wrote:
> On 2025/4/14 16:08, Andy Shevchenko wrote:
> > On Thu, Apr 10, 2025 at 09:12:12PM +0800, Zijun Hu wrote:
> >> From: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
> >>
> >> software_node_get_reference_args() wants to get @index-th element, so
> >> the property value requires at least '(index + 1) * sizeof(*ref)' bytes.
> >>
> >> Correct the check to avoid OOB access.
> > Any real traceback?
>
> no, find this issue during reading code.

Please, mention this in the commit message.

--
With Best Regards,
Andy Shevchenko