]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commit
pcnet: force the buffer access to be in bounds during tx qemu-xen-4.5.1
authorPetr Matousek <pmatouse@redhat.com>
Sun, 24 May 2015 08:53:44 +0000 (10:53 +0200)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 10 Jun 2015 11:43:51 +0000 (11:43 +0000)
commitd9552b0af21c27535cd3c8549bb31d26bbecd506
tree178807b7eed6ba6fe7e1a0d81344164cbcee79dc
parent1e01612c9a6e6ca4a8c86f87bd6a36ef645f1340
pcnet: force the buffer access to be in bounds during tx

4096 is the maximum length per TMD and it is also currently the size of
the relay buffer pcnet driver uses for sending the packet data to QEMU
for further processing. With packet spanning multiple TMDs it can
happen that the overall packet size will be bigger than sizeof(buffer),
which results in memory corruption.

Fix this by only allowing to queue maximum sizeof(buffer) bytes.

This is CVE-2015-3209.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Reported-by: Matt Tait <matttait@google.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/pcnet.c