media: tegra: nvavp: Fix arbitrary kernel write
authorSomu Sundaram <somasundaram@nvidia.com>
Tue, 15 Mar 2016 13:01:57 +0000 (18:01 +0530)
committerMatthew Pedro <mapedro@nvidia.com>
Tue, 5 Apr 2016 20:56:54 +0000 (13:56 -0700)
commitc87e60a0b17e565fee2f065a651cab849ae8335b
treef65303a505dc86d4b74480eecd0cd7d23e7396b3
parent5d78423f5051ddf0b94ca26e9d1c2e9d3e83a939
media: tegra: nvavp: Fix arbitrary kernel write

Add checks for command buffer offset, relocation
offset in command buffer and target offset for patching
relocation to prevent aritrary kernel write

Bug 1741516

Change-Id: Ia6183ca75f983c0ede23606be9e5d824aa5fa41d
Signed-off-by: Somu Sundaram <somasundaram@nvidia.com>
Reviewed-on: http://git-master/r/1111699
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Somu Sundaram <somasundarams@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/media/platform/tegra/nvavp/nvavp_dev.c