crypto/cnxk: prevent out of bound access in crypto_caps
PATCH 1/1 crypto/cnxk: prevent out of bound access in crypto_caps
In a situation where crypto_caps elements are checked only for RTE_CRYPTO_OP_TYPE_UNDEFINED until valid op defined, there is possibility for an out of bound access. Add this array by one element for current capabilities.
Signed-off-by Gowrishankar Muthukrishnan <[email protected]>
--- drivers/crypto/cnxk/cnxk_cryptodev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/cnxk/cnxk_cryptodev.h +1 -1
@@ -10,7 +10,7 @@#include "roc_cpt.h" -#define CNXK_CPT_MAX_CAPS 34 +#define CNXK_CPT_MAX_CAPS 35#define CNXK_SEC_CRYPTO_MAX_CAPS 11#define CNXK_SEC_MAX_CAPS 5#define CNXK_AE_EC_ID_MAX 8
Signature · 1 line
2.25.1
Quoted 11 lines
In a situation where
crypto_capselements are checked only forRTE_CRYPTO_OP_TYPE_UNDEFINEDuntil valid op defined, there is possibility for an out of bound access. Add this array by one element for current capabilities.Signed-off-by Gowrishankar Muthukrishnan <[email protected]>--- drivers/crypto/cnxk/cnxk_cryptodev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by Anoob Joseph <[email protected]>