lkml.org 
[lkml]   [2022]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] property: add fwnode_property_read_string_index()
On Fri, Mar 18, 2022 at 05:00:47PM +0100, Clément Léger wrote:
> Add fwnode_property_read_string_index() function which allows to
> retrieve a string from an array by its index. This function is the
> equivalent of of_property_read_string_index() but for fwnode support.

...

> + values = kcalloc(nval, sizeof(*values), GFP_KERNEL);
> + if (!values)
> + return -ENOMEM;
> +
> + ret = fwnode_property_read_string_array(fwnode, propname, values, nval);
> + if (ret < 0)
> + goto out;
> +
> + *string = values[index];
> +out:
> + kfree(values);

Here is UAF (use after free). How is it supposed to work?

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-03-18 17:29    [W:0.152 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site