Re: [PATCH v3] net: don't call strlen on non-terminated string in dev_set_alias()

2017-06-01 Thread Alexander Potapenko
On Thu, Jun 1, 2017 at 4:04 PM, Yury Norov wrote: > On Thu, Jun 01, 2017 at 03:50:33PM +0200, Alexander Potapenko wrote: >> On Thu, Jun 1, 2017 at 3:47 PM, Yury Norov wrote: >> > On Thu, Jun 01, 2017 at 02:38:29PM +0200, Alexander Potapenko wrote: >> >> KMSAN reported a use of uninitialized memor

Re: [PATCH v3] net: don't call strlen on non-terminated string in dev_set_alias()

2017-06-01 Thread Yury Norov
On Thu, Jun 01, 2017 at 03:50:33PM +0200, Alexander Potapenko wrote: > On Thu, Jun 1, 2017 at 3:47 PM, Yury Norov wrote: > > On Thu, Jun 01, 2017 at 02:38:29PM +0200, Alexander Potapenko wrote: > >> KMSAN reported a use of uninitialized memory in dev_set_alias(), > >> which was caused by calling s

Re: [PATCH v3] net: don't call strlen on non-terminated string in dev_set_alias()

2017-06-01 Thread Alexander Potapenko
On Thu, Jun 1, 2017 at 3:47 PM, Yury Norov wrote: > On Thu, Jun 01, 2017 at 02:38:29PM +0200, Alexander Potapenko wrote: >> KMSAN reported a use of uninitialized memory in dev_set_alias(), >> which was caused by calling strlcpy() (which in turn called strlen()) >> on the user-supplied non-terminat

Re: [PATCH v3] net: don't call strlen on non-terminated string in dev_set_alias()

2017-06-01 Thread Yury Norov
On Thu, Jun 01, 2017 at 02:38:29PM +0200, Alexander Potapenko wrote: > KMSAN reported a use of uninitialized memory in dev_set_alias(), > which was caused by calling strlcpy() (which in turn called strlen()) > on the user-supplied non-terminated string. > > Signed-off-by: Alexander Potapenko > --

[PATCH v3] net: don't call strlen on non-terminated string in dev_set_alias()

2017-06-01 Thread Alexander Potapenko
KMSAN reported a use of uninitialized memory in dev_set_alias(), which was caused by calling strlcpy() (which in turn called strlen()) on the user-supplied non-terminated string. Signed-off-by: Alexander Potapenko --- v3: removed the multi-line comment v2: fixed an off-by-one error spotted by Dmi