linux-stable/drivers/soc/aspeed
Iwona Winiarska b49a0e69a7 soc: aspeed: lpc-ctrl: Fix boundary check for mmap
The check mixes pages (vm_pgoff) with bytes (vm_start, vm_end) on one
side of the comparison, and uses resource address (rather than just the
resource size) on the other side of the comparison.
This can allow malicious userspace to easily bypass the boundary check and
map pages that are located outside memory-region reserved by the driver.

Fixes: 6c4e976785 ("drivers/misc: Add Aspeed LPC control driver")
Cc: stable@vger.kernel.org
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Tested-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Joel Stanley <joel@aj.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-08-17 17:58:42 +09:30
..
aspeed-lpc-ctrl.c soc: aspeed: lpc-ctrl: Fix boundary check for mmap 2021-08-17 17:58:42 +09:30
aspeed-lpc-snoop.c soc: aspeed: fix a ternary sign expansion bug 2021-04-23 11:16:47 +02:00
aspeed-p2a-ctrl.c ARM: SoC-related driver updates 2019-05-16 09:19:14 -07:00
aspeed-socinfo.c soc: aspeed: socinfo: Add new systems 2021-02-10 22:25:45 +10:30
Kconfig soc: aspeed: Enable drivers with ARCH_ASPEED 2020-11-19 23:01:36 +10:30
Makefile soc: aspeed: Add soc info driver 2020-09-25 10:14:06 +09:30