]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen: fix potential integer overflow in queue_reply
authorInsu Yun <wuninsu@gmail.com>
Mon, 18 Jan 2016 16:54:43 +0000 (11:54 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 May 2016 20:45:05 +0000 (22:45 +0200)
commitadb389d2bcf7a42d181979c8117ccfcdb4406a19
tree1de2361fb9c158b6025fe687a9cdf8ea06ae4065
parent5ed256a38c3ffb449de6b92bf705fb8878dacbba
xen: fix potential integer overflow in queue_reply

When len is greater than UINT_MAX - sizeof(*rb), in next allocation,
it can overflow integer range and allocates small size of heap.
After that, memcpy will overflow the allocated heap.
Therefore, it needs to check the size of given length.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 85c0a87cd117e83361932b2b160c9af178fdb21a)
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
drivers/xen/xenbus/xenbus_dev_frontend.c