On Wed, Dec 03, 2025 at 01:44:38AM +0800, Gui-Dong Han wrote:
> The driver_override_show() function reads the driver_override string
> without holding the device_lock. However, driver_override_store() uses
> driver_set_override(), which modifies and frees the string while holding
> the device_lock.
> 
> This can result in a concurrent use-after-free if the string is freed
> by the store function while being read by the show function.
> 
> Fix this by holding the device_lock around the read operation.
> 
> Fixes: 1f86a00c1159 ("bus/fsl-mc: add support for 'driver_override' in the 
> mc-bus")
> Cc: [email protected]
> Signed-off-by: Gui-Dong Han <[email protected]>

Reviewed-by: Ioana Ciornei <[email protected]>

Thanks!


Reply via email to