Memzones are created in testpmd in order to test external data buffers functionality. Each memzone is 2Mb in size and divided among the pool of external memory buffers. Memzone may not always be fully utilized because mbufs size can vary and some space can be left unused at the tail of a memzone. This is not handled properly and mbuf can get the address of this leftover space since this address is still valid (part of memzone), but there is not enough space to fit the whole packet data. As a result packet data may overflow and cause the memory corruption. Take mbuf size into account when distributing memory addresses from a memzone to external mbufs. Skip the remaining tail in case there is not enough room for a packet and move to a next memzone instead. Fixes: 6c8e50c2e5 ("mbuf: create pool with external memory buffers") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Olivier Matz <olivier.matz@6wind.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%