crypto: qat/qat_420xx - fix off by one in uof_get_name()
BugLink: https://bugs.launchpad.net/bugs/2101915
[ Upstream commit 93a11608fb3720e1bc2b19a2649ac2b49cca1921 ]
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: fcf60f4bcf ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
CVE-2024-53163
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
d1e8073c80
commit
c7a95dca1c
@@ -428,7 +428,7 @@ static const char *uof_get_name(struct adf_accel_dev *accel_dev, u32 obj_num,
|
||||
else
|
||||
id = -EINVAL;
|
||||
|
||||
if (id < 0 || id > num_objs)
|
||||
if (id < 0 || id >= num_objs)
|
||||
return NULL;
|
||||
|
||||
return fw_objs[id];
|
||||
|
||||
Reference in New Issue
Block a user