1
0
Fork 0
remarkable-linux/drivers/video
Peter Malone ccf92117d4 fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper().
[ Upstream commit 250c6c49e3 ]

Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in
sbusfb_ioctl_helper().

'index' is defined as an int in sbusfb_ioctl_helper().
We retrieve this from the user:
if (get_user(index, &c->index) ||
    __get_user(count, &c->count) ||
    __get_user(ured, &c->red) ||
    __get_user(ugreen, &c->green) ||
    __get_user(ublue, &c->blue))
       return -EFAULT;

and then we use 'index' in the following way:
red = cmap->red[index + i] >> 8;
green = cmap->green[index + i] >> 8;
blue = cmap->blue[index + i] >> 8;

This is a classic information leak vulnerability. 'index' should be
an unsigned int, given its usage above.

This patch is straight-forward; it changes 'index' to unsigned int
in two switch-cases: FBIOGETCMAP_SPARC && FBIOPUTCMAP_SPARC.

This patch fixes CVE-2018-6412.

Signed-off-by: Peter Malone <peter.malone@gmail.com>
Acked-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:52:12 +02:00
..
backlight backlight: tdo24m: Fix the SPI CS between transfers 2018-04-12 12:32:16 +02:00
console vgacon: Set VGA struct resource types 2018-03-24 11:01:25 +01:00
fbdev fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper(). 2018-05-30 07:52:12 +02:00
logo License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig fbdev: sh_mipi_dsi: remove driver 2016-05-10 11:53:38 +03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
display_timing.c
hdmi.c video/hdmi: Allow "empty" HDMI infoframes 2018-03-19 08:42:47 +01:00
of_display_timing.c video: fbdev: Convert to using %pOF instead of full_name 2017-08-07 17:22:13 +02:00
of_videomode.c video: fbdev: Convert to using %pOF instead of full_name 2017-08-07 17:22:13 +02:00
vgastate.c fbdev: vgastate: remove trailing whitespaces 2015-01-13 12:53:25 +02:00
videomode.c