crypto: qat - add param check for DH

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.

Signed-off-by: Giovanni Cabiddu <>
Reviewed-by: Adam Guerin <>
Reviewed-by: Wojciech Ziemba <>
Signed-off-by: Herbert Xu <>
1 file changed