tegra-cryptodev:Avoid untrusted usrptr dereference
authorAmulya Y <ayarlagadda@nvidia.com>
Tue, 13 Mar 2018 17:44:43 +0000 (10:44 -0700)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 16 Mar 2018 20:53:50 +0000 (13:53 -0700)
commit5e141fde7cf325a497971d0fd822505a76dc0892
tree9678d90a3ac4e125f7cad382d05572316887b704
parentea4a0cfa5731cb17c878f8c54cfe154efc416304
tegra-cryptodev:Avoid untrusted usrptr dereference

In RSA operations use copy_from_user to get key data
into local buffer before using it.

This will avoid untrusted user pointer dereference.

Coverity ID 24040

Bug 200192571
Bug 1932494

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Signed-off-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Change-Id: I0b66ab530453a2174ea41721bfef62143ee8631a
Reviewed-on: http://git-master/r/1471452
(cherry picked from commit 3c4b3e5eaec607e9c23613563d447e149298fd22)
Reviewed-on: https://git-master.nvidia.com/r/1674423
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
drivers/misc/tegra-cryptodev.c