Re: [PATCH] [v4] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-10-07 Thread Stefan Schmidt
Hello. On 07.10.23 05:30, Dinghao Liu wrote: If of_clk_add_provider() fails in ca8210_register_ext_clock(), it calls clk_unregister() to release priv->clk and returns an error. However, the caller ca8210_probe() then calls ca8210_remove(), where priv->clk is freed again in

[PATCH] [v4] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-10-06 Thread Dinghao Liu
If of_clk_add_provider() fails in ca8210_register_ext_clock(), it calls clk_unregister() to release priv->clk and returns an error. However, the caller ca8210_probe() then calls ca8210_remove(), where priv->clk is freed again in ca8210_unregister_ext_clock(). In this case, a use-after-free may