tegra-cryptodev:Avoid untrusted usrptr dereference
authorMallikarjun Kasoju <mkasoju@nvidia.com>
Fri, 16 Mar 2018 10:10:06 +0000 (15:10 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Mon, 19 Mar 2018 18:32:05 +0000 (11:32 -0700)
commit7b67aa2c06e6906c6c190aabb1fa9722fd3cfb36
tree0488df72ffcea001929007adcccd64a7cb0f19af
parentb6d6e5af1450ed5ccae042ab1125a6b799433b73
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

Change-Id: I9c8f3fd7cfc18121d9c2179127dfb28202f38cdb
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1676570
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/misc/tegra-cryptodev.c