video: tegra: nvmap: Fix OOB vulnerability
authorSagar Kadamati <skadamati@nvidia.com>
Tue, 6 Dec 2016 06:08:01 +0000 (11:08 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Thu, 25 May 2017 20:04:22 +0000 (13:04 -0700)
commitea316a2ba8c8504069b73b8782a5ca3e34283a9e
treec1e05bf99fb5d9bef75814e76bf57b654e761097
parent98114fbc47ae84c1cd7f67ef6a0fed818adff2e6
video: tegra: nvmap: Fix OOB vulnerability

Check all pages' parameters before reserve pages.

Bug 1883463
Bug 1831426
Bug 200247013

Manual port: http://git-psac/r/9287

(cherry picked from commit 61a05b52b8a17593e2817076b9bf59efdd9268ad)

Change-Id: I2f47c385ff8f4a9ca6bf37ee41749bd684ca1a20
Signed-off-by: Xia Yang <xiay@nvidia.com>
Signed-off-by: Sagar Kadamati <skadamati@nvidia.com>
Reviewed-on: http://git-master/r/1273326
Reviewed-on: http://git-master/r/1488769
GVS: Gerrit_Virtual_Submit
Tested-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/video/tegra/nvmap/nvmap_mm.c