]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fbdev: smscufx: properly copy ioctl memory to kernelspace
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Dec 2025 13:17:03 +0000 (14:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Feb 2026 15:31:35 +0000 (16:31 +0100)
commit1c008ad0f0d1c1523902b9cdb08e404129677bfc
treec47233022ca34e9f2b03cbd1445afa453379980d
parent3e4cbd1d46c246dfa684c8e9d8c20ae0b960c50a
fbdev: smscufx: properly copy ioctl memory to kernelspace

commit 120adae7b42faa641179270c067864544a50ab69 upstream.

The UFX_IOCTL_REPORT_DAMAGE ioctl does not properly copy data from
userspace to kernelspace, and instead directly references the memory,
which can cause problems if invalid data is passed from userspace.  Fix
this all up by correctly copying the memory before accessing it within
the kernel.

Reported-by: Tianchu Chen <flynnnchen@tencent.com>
Cc: stable <stable@kernel.org>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/smscufx.c