]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit91f8c41c0ed5ba79bae6e063f7818602188f2310
treeea9cc96f7d589fe209cccd7af95047d5e631d423
parente3f3d1ee1cb69b34338a15cc08f1b23655fdd14e
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