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
..
2018-06-17 05:00:24 +09:00
2018-06-17 05:00:24 +09:00
2017-02-25 13:20:22 -08:00
2018-06-17 05:00:24 +09:00
2018-08-23 15:44:58 -07:00
2017-09-04 16:00:49 +02:00
2017-05-27 15:41:17 -04:00
2018-06-12 16:19:22 -07:00
2018-03-12 17:06:54 +01:00
2018-09-26 18:11:22 +02:00
2018-04-10 10:20:00 -07:00
2018-06-12 16:19:22 -07:00