Re: [PATCH net] net/dibs: Correct freeing of dmb_clientid_arr
From: Dust Li
Date: Tue Aug 11 2026 - 23:54:45 EST
On 2026-08-10 13:14:32, Alexandra Winter wrote:
>A dibs device interrupt handler can be active after dibs_dev_del() and
>may still access dmb_clientid_arr. (UAF)
>
>In case of a failure in dibs_dev_add() being called by dibs_lo_dev_probe()
>dmb_clientid_arr is freed twice (double free).
>
>Free dmb_clientid_arr in dibs_dev_release() after last reference is gone.
>Note that allocating in dibs_dev_add() instead of dibs_dev_alloc() is ok
>for now, because no dmbs can be registered before dibs_dev_add().
>
>Fixes: cc21191b584c ("dibs: Move data path to dibs layer")
>Cc: stable@xxxxxxxxxxxxxxx
>Co-developed-by: Hidayath Khan <hidayath@xxxxxxxxxxxxx>
>Signed-off-by: Hidayath Khan <hidayath@xxxxxxxxxxxxx>
>Signed-off-by: Alexandra Winter <wintera@xxxxxxxxxxxxx>
Reviewed-by: Dust Li <dust.li@xxxxxxxxxxxxxxxxx>
Best regards,
Dust