Commit 4b2034d9 authored by Hyunwoo Kim's avatar Hyunwoo Kim Committed by Lipeng Sang
Browse files

fbdev: smscufx: Fix several use-after-free bugs

stable inclusion
from stable-v5.10.153
commit d9ddfeb01fb95ffbbc7031d46a5ee2a5e45cbb86
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d9ddfeb01fb95ffbbc7031d46a5ee2a5e45cbb86



--------------------------------

commit cc67482c 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: default avatarHyunwoo Kim <imv4bel@gmail.com>
Link: https://lore.kernel.org/linux-fbdev/20221011153436.GA4446@ubuntu/


Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent 350eab50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment