linux-sg2042/drivers/video/fbdev/omap2/omapfb
Tomi Valkeinen 1bafcbf59f fbdev/omapfb: fix omapfb_memory_read infoleak
OMAPFB_MEMORY_READ ioctl reads pixels from the LCD's memory and copies
them to a userspace buffer. The code has two issues:

- The user provided width and height could be large enough to overflow
  the calculations
- The copy_to_user() can copy uninitialized memory to the userspace,
  which might contain sensitive kernel information.

Fix these by limiting the width & height parameters, and only copying
the amount of data that we actually received from the LCD.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Jann Horn <jannh@google.com>
Cc: stable@vger.kernel.org
Cc: security@kernel.org
Cc: Will Deacon <will.deacon@arm.com>
Cc: Jann Horn <jannh@google.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2018-09-26 18:11:22 +02:00
..
displays fbdev changes for v4.19: 2018-08-23 15:44:58 -07:00
dss media: omap2: omapfb: fix bugon.cocci warnings 2018-08-02 19:01:38 -04:00
Kconfig fb_omap2: add gpiolib dependency 2018-06-08 18:08:12 +02:00
Makefile omapfb: rename omap2 module to omap2fb.ko 2018-07-24 19:11:27 +02:00
omapfb-ioctl.c fbdev/omapfb: fix omapfb_memory_read infoleak 2018-09-26 18:11:22 +02:00
omapfb-main.c media: omap2: omapfb: fix boolreturn.cocci warnings 2018-08-02 19:01:05 -04:00
omapfb-sysfs.c omapfb: Create new header file for omapfb DSS implementation 2016-06-03 16:06:38 +03:00
omapfb.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
vrfb.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00