Re: [PATCH net] sctp: fix ICMP processing if skb is non-linear

2017-05-22 Thread Davide Caratti
hello Xin Long, On Sat, 2017-05-20 at 02:40 +0800, Xin Long wrote: > On Fri, May 19, 2017 at 11:34 PM, Davide Caratti wrote: > > @@ -515,14 +515,23 @@ struct sock *sctp_err_lookup(struct net *net, int > > family, struct sk_buff *skb, > > * or the chunk type or the Initiate Tag does not m

Re: [PATCH net] sctp: fix ICMP processing if skb is non-linear

2017-05-19 Thread Xin Long
On Fri, May 19, 2017 at 11:34 PM, Davide Caratti wrote: > when the ICMP packet is carried by a paged skb, sctp_err_lookup() may fail > validation even if the payload contents match an open socket: as a > consequence, sometimes ICMPs are wrongly ignored. Use skb_header_pointer() > to retrieve encap

[PATCH net] sctp: fix ICMP processing if skb is non-linear

2017-05-19 Thread Davide Caratti
when the ICMP packet is carried by a paged skb, sctp_err_lookup() may fail validation even if the payload contents match an open socket: as a consequence, sometimes ICMPs are wrongly ignored. Use skb_header_pointer() to retrieve encapsulated SCTP headers, to ensure that ICMP payloads are validated