Thread (3 messages) flat view 3 messages, 3 authors, 2016-07-26

Re: [PATCH net-next] udp: use sk_filter_trim_cap for udp{,6}_queue_rcv_skb

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2016-07-25 16:48:50

On Mon, Jul 25, 2016 at 12:06 PM, Daniel Borkmann [off-list ref] wrote:
After a612769774a3 ("udp: prevent bugcheck if filter truncates packet
too much"), there followed various other fixes for similar cases such
as f4979fcea7fd ("rose: limit sk_filter trim to payload").

Latter introduced a new helper sk_filter_trim_cap(), where we can pass
the trim limit directly to the socket filter handling. Make use of it
here as well with sizeof(struct udphdr) as lower cap limit and drop the
extra skb->len test in UDP's input path.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Willem de Bruijn <willemb@google.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help