[Xen-devel] [PATCH v2] xen: fix potential integer overflow in queue_reply

2016-01-18 Thread Insu Yun
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 --- drivers/xen/xenbus

[Xen-devel] [PATCH] xen: fix potential integer overflow in queue_reply

2016-01-18 Thread Insu Yun
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 --- drivers/xen/xenbus

Re: [Xen-devel] [PATCH] xen-netback: correctly check failed allocation

2015-10-16 Thread Insu Yun
, 2015 at 02:02:47PM -0400, Insu Yun wrote: > >> I changed patch with valid format. > >> > >> On Thu, Oct 15, 2015 at 2:02 PM, Insu Yun wrote: > >> > >>> Since vzalloc can be failed in memory pressure, > >>> writes -ENOM

[Xen-devel] [PATCH] xen-netback: correctly check failed allocation

2015-10-15 Thread Insu Yun
Since vzalloc can be failed in memory pressure, writes -ENOMEM to xenstore to indicate error. Signed-off-by: Insu Yun --- drivers/net/xen-netback/xenbus.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 929a6e7

Re: [Xen-devel] [PATCH] xen-netback: corretly check failed allocation

2015-10-15 Thread Insu Yun
Sorry for wrong format, I forgot to change my configuration. On Thu, Oct 15, 2015 at 1:13 PM, Wei Liu wrote: > On Thu, Oct 15, 2015 at 12:26:16PM -0400, Insu Yun wrote: > > Since vzalloc can be failed in memory pressure, > > return value should be checked and return ENOMEM. &g

Re: [Xen-devel] [PATCH] xen-netback: correctly check failed allocation

2015-10-15 Thread Insu Yun
I changed patch with valid format. On Thu, Oct 15, 2015 at 2:02 PM, Insu Yun wrote: > Since vzalloc can be failed in memory pressure, > writes -ENOMEM to xenstore to indicate error. > > Signed-off-by: Insu Yun > --- > drivers/net/xen-netback/xenbus.c | 6 ++ > 1 file

[Xen-devel] [PATCH] xen-netback: corretly check failed allocation

2015-10-15 Thread Insu Yun
Since vzalloc can be failed in memory pressure, return value should be checked and return ENOMEM. Signed-off-by: Insu Yun --- drivers/net/xen-netback/xenbus.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index