Re: [PATCH] netfilter: ebtables: handle string from userspace with care

2018-05-18 Thread Pablo Neira Ayuso
On Fri, Apr 27, 2018 at 10:45:31AM +0200, Paolo Abeni wrote: > strlcpy() can't be safely used on a user-space provided string, > as it can try to read beyond the buffer's end, if the latter is > not NULL terminated. Applied, thanks!

Re: [PATCH] netfilter: ebtables: handle string from userspace with care

2018-04-27 Thread Dmitry Vyukov
On Fri, Apr 27, 2018 at 11:26 AM, Florian Westphal wrote: > Paolo Abeni wrote: >> strlcpy() can't be safely used on a user-space provided string, >> as it can try to read beyond the buffer's end, if the latter is >> not NULL terminated. > > Yes. > >> Leveraging the above, syzbot has been able to

Re: [PATCH] netfilter: ebtables: handle string from userspace with care

2018-04-27 Thread Florian Westphal
Paolo Abeni wrote: > strlcpy() can't be safely used on a user-space provided string, > as it can try to read beyond the buffer's end, if the latter is > not NULL terminated. Yes. > Leveraging the above, syzbot has been able to trigger the following > splat: > > BUG: KASAN: stack-out-of-bounds i