Commit 52917e2
committed
fbdev: smscufx: properly copy ioctl memory to kernelspace
commit 120adae 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>1 parent 9efa0dc commit 52917e2
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
935 | | - | |
936 | 935 | | |
937 | 936 | | |
938 | 937 | | |
| |||
947 | 946 | | |
948 | 947 | | |
949 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
950 | 953 | | |
951 | 954 | | |
952 | 955 | | |
| |||
956 | 959 | | |
957 | 960 | | |
958 | 961 | | |
959 | | - | |
| 962 | + | |
| 963 | + | |
960 | 964 | | |
961 | 965 | | |
962 | 966 | | |
| |||
0 commit comments