]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commit
net: pcnet: add check to validate receive data size(CVE-2015-7504)
authorPrasad J Pandit <pjp@fedoraproject.org>
Fri, 20 Nov 2015 06:20:31 +0000 (11:50 +0530)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 5 Feb 2016 13:58:51 +0000 (13:58 +0000)
commit7c3390f82eae5cff3e3858253c6e189e5698033e
tree63aa6af2aeda2c6692fe73140ad87613c28d63c7
parent75c57190671cd2cfdfbbc448fb3c752dc46018d8
net: pcnet: add check to validate receive data size(CVE-2015-7504)

In loopback mode, pcnet_receive routine appends CRC code to the
receive buffer. If the data size given is same as the buffer size,
the appended CRC code overwrites 4 bytes after s->buffer. Added a
check to avoid that.

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