]> git.baikalelectronics.ru Git - kernel.git/commit
fbdev: smscufx: Fix use-after-free in ufx_ops_open()
authorHyunwoo Kim <imv4bel@gmail.com>
Sun, 25 Sep 2022 13:32:43 +0000 (06:32 -0700)
committerHelge Deller <deller@gmx.de>
Sat, 8 Oct 2022 13:20:09 +0000 (15:20 +0200)
commitbd7132bd3b0904d5be1c55f9faa22be32627c466
tree0c333e5ee6640fb5f8a318194b49e4348c40d0ca
parent3cec586caf21cbdcc077f83adf853034343cf470
fbdev: smscufx: Fix use-after-free in ufx_ops_open()

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 <imv4bel@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/smscufx.c