'kni_net_rx_lo_fifo()' can get segmented buffers, using 'pkt_len' for
that case will be wrong and some values can cause buffer overflow
in destination mbuf data.
Fixes:
d89a58dfe90b ("kni: support chained mbufs")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
/* Copy mbufs */
for (i = 0; i < num; i++) {
kva = pa2kva(kni->pa[i]);
- len = kva->pkt_len;
+ len = kva->data_len;
data_kva = kva2data_kva(kva);
kni->va[i] = pa2va(kni->pa[i], kva);