Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: qat/qat_420xx - fix off by one in uof_get_name()

This is called from uof_get_name_420xx() where "num_objs" is the
ARRAY_SIZE() of fw_objs[]. The > needs to be >= to prevent an out of
bounds access.

Fixes: fcf60f4bcf54 ("crypto: qat - add support for 420xx devices")
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>

authored by

Dan Carpenter and committed by
Herbert Xu
93a11608 891d6cc9

+1 -1
+1 -1
drivers/crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c
··· 375 375 else 376 376 id = -EINVAL; 377 377 378 - if (id < 0 || id > num_objs) 378 + if (id < 0 || id >= num_objs) 379 379 return NULL; 380 380 381 381 return fw_objs[id];