]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: qat - add param check for RSA
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Mon, 9 May 2022 13:34:14 +0000 (14:34 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 May 2022 05:49:18 +0000 (13:49 +0800)
commitc0c6b9c68e54c01d9cdb85878963ad1f3bb22b41
tree543888b6afc1d92415f31b8389e9317ed969b50c
parent1219b8bcc69ac3c04a68f88ddddd1d7eb756569c
crypto: qat - add param check for RSA

Reject requests with a source buffer that is bigger than the size of the
key. This is to prevent a possible integer underflow that might happen
when copying the source scatterlist into a linear buffer.

Cc: stable@vger.kernel.org
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/qat_asym_algs.c