virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
authorAndy Lutomirski <luto@kernel.org>
Tue, 6 Dec 2016 02:10:58 +0000 (18:10 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Dec 2016 16:38:43 +0000 (11:38 -0500)
commite37e2ff350a321ad9c36b588e76f34fbba305be6
treeea9cc96f7d589fe209cccd7af95047d5e631d423
parentdcb17d22e1c2cd72e72190c736349a675362b3bc
virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()

With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a
pointer to the stack and it will OOPS.  Copy the address to the heap
to prevent the crash.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Laura Abbott <labbott@redhat.com>
Reported-by: zbyszek@in.waw.pl
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c