baseband/acc100: avoid out-of-bounds access corner cases
PATCH 1/1 baseband/acc100: avoid out-of-bounds access corner cases
Coverity issue: 375803, 375813, 375819, 375827, 375831
The actual maximum number of gather pointers should have been limited
Fixes 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")
Signed-off-by Nicolas Chautru <[email protected]>
--- drivers/baseband/acc100/rte_acc100_pmd.c | 3 +-- drivers/baseband/acc100/rte_acc100_pmd.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/baseband/acc100/rte_acc100_pmd.c +1 -2
@@ -1460,8 +1460,7 @@ next_triplet++;while (cb_len >0 ) { -if (next_triplet <ACC100_DMA_MAX_NUM_POINTERS && - m->next !=NULL ) { +if (next_triplet <ACC100_DMA_MAX_NUM_POINTERS_IN && m->next !=NULL ) { m = m->next; *seg_total_left =rte_pktmbuf_data_len (m);
drivers/baseband/acc100/rte_acc100_pmd.h +1 -0
@@ -113,6 +113,7 @@#define ACC100_SW_RING_MEM_ALLOC_ATTEMPTS 5#define ACC100_MAX_QUEUE_DEPTH 1024#define ACC100_DMA_MAX_NUM_POINTERS 14 +#define ACC100_DMA_MAX_NUM_POINTERS_IN 7#define ACC100_DMA_DESC_PADDING 8#define ACC100_FCW_PADDING 12#define ACC100_DESC_FCW_OFFSET 192
Signature · 1 line
1.8.3.1
Quoted 5 lines
Coverity issue: 375803, 375813, 375819, 375827, 375831
The actual maximum number of gather pointers should have been limitedFixes 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")Signed-off-by Nicolas Chautru <[email protected]>
Cc: [email protected]
Applied to dpdk-next-crypto
Thanks