Thread (8 messages) flat view 8 messages, 5 authors, 2020-12-27

Re: [PATCH nf] netfilter: xt_RATEEST: reject non-null terminated string from userspace

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2020-12-22 22:30:58
Also in: netfilter-devel

On Tue, Dec 22, 2020 at 2:24 PM Florian Westphal [off-list ref] wrote:
strlcpy assumes src is a c-string. Check info->name before its used.
If strlcpy is the only problem, then the fix is to use strscpy(),
which doesn't have the design mistake that strlcpy has.

Of course, if the size limit of the source and the destination differ
(ie if you really want to limit the source to one thing, and the
destination to another - there are in theory valid cases where that
happens), then there are no useful helper functions for that.

                Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help