]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
drivers: crypto: Avoid use of tainted scalar value
authorAniruddha TVS Rao <anrao@nvidia.com>
Tue, 28 Mar 2017 11:51:00 +0000 (17:21 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 9 Nov 2017 13:30:43 +0000 (05:30 -0800)
commitb0cd583b340d08ef2428ef467095f86e993cfcb0
treef34ac4b48227b6ed34d381db3d0fc7d0585686e1
parentbcc5eea3a9258292707f8d997d13eb0bf3fa89b5
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.

Coverity ID 24040

Bug 200192571
Bug 1862381

Change-Id: I75237559409178468a6425ec3ceb4b601b21e2de
Signed-off-by: Aniruddha TVS Rao <anrao@nvidia.com>
Reviewed-on: http://git-master/r/1329922
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
(cherry picked from commit 3538fb80178bce43a1f3250ac3340f0bda54de63)
Reviewed-on: https://git-master.nvidia.com/r/1554425
GVS: Gerrit_Virtual_Submit
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/crypto/tegra-cryptodev.c
drivers/crypto/tegra-cryptodev.h