]> git.baikalelectronics.ru Git - kernel.git/commit
fbdev: smscufx: Fix several use-after-free bugs
authorHyunwoo Kim <imv4bel@gmail.com>
Fri, 21 Oct 2022 01:15:44 +0000 (18:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:56:53 +0000 (23:56 +0900)
commitcc3ca64bd17338855c9aa81da9c9455dbbca5ec0
treeb2f4ec0b5b860f2f7390b9de4fe5620c47dfd6a0
parent5ec12dcc938c091f05f541412e06d93290902b87
fbdev: smscufx: Fix several use-after-free bugs

commit 1be74e18fd32b5d0299e02c5259ded9888d3395d upstream.

Several types of UAFs can occur when physically removing a USB device.

Adds ufx_ops_destroy() function to .fb_destroy of fb_ops, and
in this function, there is kref_put() that finally calls ufx_free().

This fix prevents multiple UAFs.

Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Link: https://lore.kernel.org/linux-fbdev/20221011153436.GA4446@ubuntu/
Cc: <stable@vger.kernel.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/smscufx.c