]> xenbits.xensource.com Git - qemu-xen.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 12:14:16 +0000 (12:14 +0000)
commit276b20de45fa4925b3f22821d86a19d559dfd459
treeca1f1e42518cb10e03a8ff1dd089ba93af329a22
parent5d936e155198995f01c348da6184ceddb8deecce
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