[PATCH v2] firmware: arm_scmi: fix slab-use-after-free in scmi_bus_notifier()

Cristian Marussi cristian.marussi at arm.com
Fri Oct 18 04:09:04 PDT 2024


On Wed, Oct 16, 2024 at 02:13:38PM +0800, Xinqi Zhang wrote:
> The scmi_dev->name is released prematurely in __scmi_device_destroy(),
> which causes slab-use-after-free when accessing scmi_dev->name in
> scmi_bus_notifier(). So move the release of scmi_dev->name to
> scmi_device_release() to avoid slab-use-after-free.

LGTM.

Reviewed-by: Cristian Marussi <cristian.marussi at arm.com>

Thanks,
Cristian



More information about the linux-arm-kernel mailing list