Loading
crypto: qat - prevent underflow in rp2srv_store()
mainline inclusion from mainline-v6.8-rc1 commit e53c741303a59ee1682e11f61b7772863e02526d category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I9A5BW CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e53c741303a59ee1682e11f61b7772863e02526d ------------------------------------- The "ring" variable has an upper bounds check but nothing checks for negatives. This code uses kstrtouint() already and it was obviously intended to be declared as unsigned int. Make it so. Intel-SIG: commit e53c741303a5 crypto: qat - prevent underflow in rp2srv_store() Backport to support QAT in-tree driver Fixes: dbc8876dd873 ("crypto: qat - add rp2svc sysfs attribute") Signed-off-by:Dan Carpenter <dan.carpenter@linaro.org> Acked-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au> [ Aichun Shi: amend commit log ] Signed-off-by:
Aichun Shi <aichun.shi@intel.com>