video: tegra: nvmap: Fix OOB vulnerability
authorSagar Kadamati <skadamati@nvidia.com>
Tue, 6 Dec 2016 06:08:01 +0000 (11:08 +0530)
committerManish Tuteja <mtuteja@nvidia.com>
Wed, 1 Mar 2017 00:36:37 +0000 (16:36 -0800)
commit62e74dd064bf0f6c3e785080084431f50f81c2d4
treeb89e5577cbe9c70889882461c63b94be211728f1
parentb8b92c3bb03ec5861d8853daa82febbc75c6b64c
video: tegra: nvmap: Fix OOB vulnerability

Check all pages' parameters before reserve pages.

Bug 1831426
Bug 200247013
Bug 1849492
CVE-2016-8428 (A-31993456)

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

(cherry picked from commit 61a05b52b8a17593e2817076b9bf59efdd9268ad)

Change-Id: I2f47c385ff8f4a9ca6bf37ee41749bd684ca1a20
Reviewed-on: http://git-master/r/1273326
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1285872
(cherry picked from commit 0a44c684a3bdad4d25d0c5a89e04170196e12ff6)
Reviewed-on: http://git-master/r/1299504
(cherry picked from commit e124868998c604716d0ece1a0cb7e187db4adb18)
Reviewed-on: http://git-master/r/1311421
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
drivers/video/tegra/nvmap/nvmap_mm.c