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_4xxx - fix off by one in uof_get_name()

The fw_objs[] array has "num_objs" elements so the > needs to be >= to
prevent an out of bounds read.

Fixes: 10484c647af6 ("crypto: qat - refactor fw config logic for 4xxx")
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
475b5098 93a11608

+1 -1
+1 -1
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
··· 334 334 else 335 335 id = -EINVAL; 336 336 337 - if (id < 0 || id > num_objs) 337 + if (id < 0 || id >= num_objs) 338 338 return NULL; 339 339 340 340 return fw_objs[id];