Re: [PATCH v2] tipc: Avoid copying bytes beyond the supplied data

2019-05-23 Thread Ying Xue
On 5/23/19 4:46 AM, Chris Packham wrote: > On most distros that is generated from include/uapi in the kernel source > and packaged as part of libc or a kernel-headers package. So once this > patch is accepted and makes it into the distros > /usr/include/linux/tipc_config.h will have this fix. T

Re: [PATCH v2] tipc: Avoid copying bytes beyond the supplied data

2019-05-22 Thread Chris Packham
Hi Ying, On 22/05/19 7:58 PM, Ying Xue wrote: > On 5/20/19 11:45 AM, Chris Packham wrote: >> TLV_SET is called with a data pointer and a len parameter that tells us >> how many bytes are pointed to by data. When invoking memcpy() we need >> to careful to only copy len bytes. >> >> Previously we wo

Re: [PATCH v2] tipc: Avoid copying bytes beyond the supplied data

2019-05-22 Thread Ying Xue
On 5/20/19 11:45 AM, Chris Packham wrote: > TLV_SET is called with a data pointer and a len parameter that tells us > how many bytes are pointed to by data. When invoking memcpy() we need > to careful to only copy len bytes. > > Previously we would copy TLV_LENGTH(len) bytes which would copy an ex

[PATCH v2] tipc: Avoid copying bytes beyond the supplied data

2019-05-19 Thread Chris Packham
TLV_SET is called with a data pointer and a len parameter that tells us how many bytes are pointed to by data. When invoking memcpy() we need to careful to only copy len bytes. Previously we would copy TLV_LENGTH(len) bytes which would copy an extra 4 bytes past the end of the data pointer which n