]> git.ipfire.org Git - people/ms/linux.git/commit
virtio-net: drop NETIF_F_FRAGLIST
authorJason Wang <jasowang@redhat.com>
Wed, 5 Aug 2015 02:34:04 +0000 (10:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 18:42:54 +0000 (13:42 -0500)
commit6d419a0b5bcdfe5b2cc8821d11b102dba01b28f6
treef0a7a9912a8770331c9887e546d1ce3b42913733
parentdfc91042ce263ee530897d47cd84fb8146b308dc
virtio-net: drop NETIF_F_FRAGLIST

[ Upstream commit 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39 ]

virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.

A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.

Drop NETIF_F_FRAGLIST so we only get what we can handle.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/virtio_net.c