Re: [PATCH] hwmon: (ibmpex) Fix use-after-free in sysfs removal
From: Guenter Roeck
Date: Thu Dec 18 2025 - 13:45:55 EST
On Thu, Dec 18, 2025 at 03:56:47PM +0800, Junrui Luo wrote:
> There is a use-after-free vulnerability in the ibmpex driver where
> the driver frees the sensors array while sysfs read operations
> via ibmpex_show_sensor() are still in progress.
>
> Fix this by reordering cleanup operations in ibmpex_bmc_delete().
>
> Reported-by: Yuhao Jiang <danisjiang@xxxxxxxxx>
> Reported-by: Junrui Luo <moonafterrain@xxxxxxxxxxx>
> Fixes: 57c7c3a0fdea ("hwmon: IBM power meter driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Junrui Luo <moonafterrain@xxxxxxxxxxx>
A more complete fix is already queued in the hwmon branch as commit
6946c726c3f4 ("hwmon: (ibmpex) fix use-after-free in high/low store").
Thanks,
Guenter