Re: [PATCH] i3c: dw: Fix use-after-free in dw_i3c_master driver due to race condition
From: Alexandre Belloni
Date: Sun Jan 12 2025 - 18:05:53 EST
On Wed, 27 Nov 2024 18:35:11 +0800, Pei Xiao wrote:
> In dw_i3c_common_probe, &master->hj_work is bound with
> dw_i3c_hj_work. And dw_i3c_master_irq_handler can call
> dw_i3c_master_irq_handle_ibis function to start the work.
>
> If we remove the module which will call dw_i3c_common_remove to
> make cleanup, it will free master->base through i3c_master_unregister
> while the work mentioned above will be used. The sequence of operations
> that may lead to a UAF bug is as follows:
>
> [...]
Applied, thanks!
[1/1] i3c: dw: Fix use-after-free in dw_i3c_master driver due to race condition
https://git.kernel.org/abelloni/c/b75439c945b9
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com