]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 15 Feb 2016 13:56:57 +0000 (13:56 +0000)
commit192f8383494944859e8872f40b4ed696e482fda5
tree3f29931c9be46cb4ed83c1bf75cf05b85293e2fd
parentccfea93c754e1eca87c8fe326aff9f35da5f74be
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>
drivers/xen/xenbus/xenbus_dev_frontend.c