]> xenbits.xensource.com Git - qemu-upstream-4.5-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:55:01 +0000 (14:55 +0000)
commit9497b3fec7842f42617a6aa479b5e4f4bcdbeb1d
treeefe738ff11fe979489f44c7424974028dbb0ee0d
parent3f19ed9b07fb2e14cb99616a15c209fd2e8170eb
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