# Re: \[PATCH v3\] video: fbdev: smscufx: Fix use-after-free in ufx\_ops\_open()

- From: Helge Deller \<deller@gmx.de\>
- Date: 2022-09-25 15:47:39 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2022/09/9225016
- Thread: https://ratatoskr.run/linux-fbdev/2022/09/9225017/t.md

```text
On 9/25/22 15:32, Hyunwoo Kim wrote:
> A race condition may occur if the user physically removes the
> USB device while calling open() for this device node.
>
> This is a race condition between the ufx_ops_open() function and
> the ufx_usb_disconnect() function, which may eventually result in UAF.
>
> So, add a mutex to the ufx_ops_open() and ufx_usb_disconnect() functions
> to avoid race contidion of krefs.
>
> Signed-off-by: Hyunwoo Kim <redacted>

applied.

Thanks!
Helge
```
