[PATCH 1/6] net/memif: guard against empty Tx burst
Stephen Hemminger
stephen at networkplumber.org
Wed Oct 14 17:07:39 CEST 2026
On Wed, 14 Oct 2026 11:12:52 +0200
Sriram Yagnaraman <sriram.yagnaraman at ericsson.com> wrote:
> eth_memif_tx() reads bufs[0]->pool before any check on nb_pkts, to pick
> the mempool for its fast-path single-pool test. A caller that passes
> nb_pkts == 0 therefore dereferences bufs[0], which is out of bounds for
> an empty burst. Return early when there is nothing to transmit.
>
> Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
> Cc: stable at dpdk.org
>
> Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman at ericsson.com>
> ---
Calling tx_burst with 0 packets is undefined. Ok to check but drivers
are not required.
More information about the dev
mailing list