]> git.ipfire.org Git - thirdparty/qemu.git/commit
curl: check data size before memcpy to local buffer. (CVE-2014-0144)
authorFam Zheng <famz@redhat.com>
Wed, 26 Mar 2014 12:05:40 +0000 (13:05 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Jul 2014 21:18:11 +0000 (16:18 -0500)
commit4854971ac1bbc95c41f6c99c8482903c2ef8d1bb
tree1e8aab7ae1e35cdd20c89c27d91834534dfbb052
parent1786c4225db1ff1241d76e1f96a2acc1bea51d2d
curl: check data size before memcpy to local buffer. (CVE-2014-0144)

curl_read_cb is callback function for libcurl when data arrives. The
data size passed in here is not guaranteed to be within the range of
request we submitted, so we may overflow the guest IO buffer. Check the
real size we have before memcpy to buffer to avoid overflow.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 6d4b9e55fc625514a38d27cff4b9933f617fa7dc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/curl.c