kni: fix segmented mbuf data overflow
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 11 Jul 2019 12:35:07 +0000 (13:35 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 18 Jul 2019 21:29:57 +0000 (23:29 +0200)
commit60d7debe922b14dcda96766fabbe7ad3f012800c
treefb8d06005fc1227125737d5f42be80bd8bb6aa7f
parentb58b3c96752eb9b11b41ad5077f288dd4003f072
kni: fix segmented mbuf data overflow

'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>
kernel/linux/kni/kni_net.c