Linsi Yuan
6ebabb76a5
net/bnxt: fix possible stack smashing
We see a stack smashing as a result of defensive code missing. Once the nb_pkts is less than RTE_BNXT_DESCS_PER_LOOP, it will be modified to zero after doing a floor align, and we can not exit the following receiving packets loop. And the buffers will be overwrite, then the stack frame was ruined. Fix the problem by adding defensive code, once the nb_pkts is zero, just directly return with no packets. Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode") Cc: stable@dpdk.org Signed-off-by: Linsi Yuan <yuanlinsi01@baidu.com> Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com> Acked-by: Lance Richardson <lance.richardson@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%