crypto: qat - don't use userspace pointer
authorTadeusz Struk <tadeusz.struk@intel.com>
Wed, 21 Oct 2015 21:57:09 +0000 (14:57 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Nov 2015 10:03:43 +0000 (18:03 +0800)
Bugfix - don't dereference userspace pointer.

Cc: stable@vger.kernel.org
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_ctl_drv.c

index 03856ad280b9349d650a0d06723a9f9da31e7c75..473d36d91644c2a00010d89dfc280d08c7ed343e 100644 (file)
@@ -198,7 +198,7 @@ static int adf_copy_key_value_data(struct adf_accel_dev *accel_dev,
                        goto out_err;
                }
 
-               params_head = section_head->params;
+               params_head = section.params;
 
                while (params_head) {
                        if (copy_from_user(&key_val, (void __user *)params_head,