]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commit
pcnet: fix rx buffer overflow(CVE-2015-7512)
authorJason Wang <jasowang@redhat.com>
Mon, 30 Nov 2015 07:00:06 +0000 (15:00 +0800)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 5 Feb 2016 14:47:09 +0000 (14:47 +0000)
commitfc857bbe30c58b627423c58004d8d6e75df74846
tree0ad815ca8b7d89bc074f211f8ac295bf3e47e15e
parent36b4f8a6fe38e1bd3c8ec51d4f6e168d05282713
pcnet: fix rx buffer overflow(CVE-2015-7512)

Backends could provide a packet whose length is greater than buffer
size. Check for this and truncate the packet to avoid rx buffer
overflow in this case.

Cc: Prasad J Pandit <pjp@fedoraproject.org>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/pcnet.c