]> xenbits.xensource.com Git - qemu-upstream-4.3-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 14:47:09 +0000 (14:47 +0000)
commit10c1b763c26feb645627a1639e722515f3e1e876
tree1240bd8b656238c78780bd493aa2ad5ac1600149
parentfc857bbe30c58b627423c58004d8d6e75df74846
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/pcnet.c