Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-23 Thread Martin K. Petersen
Kees, > When copying attributes, the len argument was padded out and the > resulting memcpy() would copy beyond the end of the source buffer. > Avoid this, and use size_t for val_len to avoid all the > casts. Similarly, avoid source buffer casts and use void *. > > Additionally enforces val_len c

Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-23 Thread Varun Prakash
On Mon, May 22, 2017 at 09:29:41AM -0700, Kees Cook wrote: > On Mon, May 22, 2017 at 8:05 AM, Varun Prakash wrote: > > On Tue, May 09, 2017 at 03:34:44PM -0700, Kees Cook wrote: > >> When copying attributes, the len argument was padded out and the resulting > >> memcpy() would copy beyond the end

Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 8:05 AM, Varun Prakash wrote: > On Tue, May 09, 2017 at 03:34:44PM -0700, Kees Cook wrote: >> When copying attributes, the len argument was padded out and the resulting >> memcpy() would copy beyond the end of the source buffer. Avoid this, >> and use size_t for val_len to

Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-22 Thread Varun Prakash
On Tue, May 09, 2017 at 03:34:44PM -0700, Kees Cook wrote: > When copying attributes, the len argument was padded out and the resulting > memcpy() would copy beyond the end of the source buffer. Avoid this, > and use size_t for val_len to avoid all the casts. Similarly, avoid source > buffer casts

Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-18 Thread Martin K. Petersen
Varun, You weren't CC:ed on this patch. Please review. Thanks! > When copying attributes, the len argument was padded out and the > resulting memcpy() would copy beyond the end of the source buffer. > Avoid this, and use size_t for val_len to avoid all the > casts. Similarly, avoid source buffer