drivers: crypto: Avoid use of tainted scalar value
authorKonduri Praveen <kondurip@nvidia.com>
Tue, 2 May 2017 09:20:40 +0000 (14:20 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 5 May 2017 21:47:36 +0000 (14:47 -0700)
commit555a69ad03e354d20a7a9bd5eb4d966d5b25c7b5
tree5b720e625397aa8f0fc7d74ddd17b1b304fde6fe
parentb16c5fd826c790df730665dcb0835ce9631ac5e1
drivers: crypto: Avoid use of tainted scalar value

Copy from user may taint the scalar value members
in the respective struct variables.
Add check for verifying the validity of the
scalar value members to avoid undefined behaviour.

Bug 1903278

Signed-off-by: Konduri Praveen <kondurip@nvidia.com>
Change-Id: Ic01c8d10886f9b02c61156f811b430acce8aca23
Reviewed-on: http://git-master/r/1473534
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
drivers/misc/tegra-cryptodev.c
drivers/misc/tegra-cryptodev.h