[PATCH net v2] ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module

2020-11-19 Thread Georg Kohmann
st fragment not including all headers") Reported-by: Randy Dunlap Reported-by: kernel test robot Signed-off-by: Georg Kohmann --- Notes: v2: Add Fixes tag and fix spelling in comment. include/net/ipv6.h | 2 -- include/net/ipv6_frag.h | 30 +

[PATCH net] ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module

2020-11-18 Thread Georg Kohmann
robot Signed-off-by: Georg Kohmann --- include/net/ipv6.h | 2 -- include/net/ipv6_frag.h | 30 ++ net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +- net/ipv6/reassembly.c | 31 +--

Re: [PATCH net v4] ipv6/netfilter: Discard first fragment not including all headers

2020-11-18 Thread Georg Kohmann (geokohma)
On 18.11.2020 19:16, Pablo Neira Ayuso wrote: > Hi, > > On Wed, Nov 11, 2020 at 12:50:25PM +0100, Georg Kohmann wrote: > [...] >> diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c >> index c8cf1bb..e3869ba 100644 >> --- a/net/ipv6/reassembly.c >> +++ b

[PATCH net v4] ipv6/netfilter: Discard first fragment not including all headers

2020-11-11 Thread Georg Kohmann
n't include all headers") Signed-off-by: Georg Kohmann --- Notes: v2: Wrap fragment validation code into exthdrs_code.c for use by both ipv6 and netfiter. v3: Remove unused variable frag_off from ipv6_frag_rcv(). v4: a) Rename ipv6_frag_validate() to ipv6_fra

Re: [PATCH net v3] ipv6/netfilter: Discard first fragment not including all headers

2020-11-09 Thread Georg Kohmann (geokohma)
On 09.11.2020 21:50, Jakub Kicinski wrote: > On Mon, 9 Nov 2020 12:52:49 +0100 Georg Kohmann wrote: >> Packets are processed even though the first fragment don't include all >> headers through the upper layer header. This breaks TAHI IPv6 Core >> Conformance Test v6LC

[PATCH net v3] ipv6/netfilter: Discard first fragment not including all headers

2020-11-09 Thread Georg Kohmann
eue() returns -EPROTO. The Fragment will later be picked up by ipv6_frag_rcv() in reassembly.c. ipv6_frag_rcv() will then send an appropriate ICMP Parameter Problem message back to the source. References commit 2efdaaaf883a ("IPv6: reply ICMP error if the first fragment don't inclu

Re: [PATCH net v2] ipv6/netfilter: Discard first fragment not including all headers

2020-11-06 Thread Georg Kohmann (geokohma)
On 06.11.2020 17:58, Jakub Kicinski wrote: > On Fri, 6 Nov 2020 14:08:03 +0100 Georg Kohmann wrote: >> diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c >> index c8cf1bb..e6173f5 100644 >> --- a/net/ipv6/reassembly.c >> +++ b/net/ipv6/reassembly.c >&g

[PATCH net v2] ipv6/netfilter: Discard first fragment not including all headers

2020-11-06 Thread Georg Kohmann
-EPROTO. The Fragment will later be picked up by ipv6_frag_rcv() in reassembly.c. ipv6_frag_rcv() will then send an appropriate ICMP Parameter Problem message back to the source. References commit 2efdaaaf883a ("IPv6: reply ICMP error if the first fragment don't include all headers"

Re: [PATCH net] ipv6/netfilter: Discard first fragment not including all headers

2020-11-04 Thread Georg Kohmann (geokohma)
On 04.11.2020 14:41, Pablo Neira Ayuso wrote: > Hi, > > On Wed, Nov 04, 2020 at 02:01:28PM +0100, Georg Kohmann wrote: >> Packets are processed even though the first fragment don't include all >> headers through the upper layer header. This breaks TAHI IPv6 Core >

[PATCH net] ipv6/netfilter: Discard first fragment not including all headers

2020-11-04 Thread Georg Kohmann
iate ICMP Parameter Problem message back to the source. References commit 2efdaaaf883a ("IPv6: reply ICMP error if the first fragment don't include all headers") Signed-off-by: Georg Kohmann --- net/ipv6/netfilter/nf_conntrack_reasm.c | 28 +++- 1 file chan

Re: [PATCHv5 net 2/2] IPv6: reply ICMP error if the first fragment don't include all headers

2020-10-30 Thread Georg Kohmann (geokohma)
On 30.10.2020 16:31, Willem de Bruijn wrote: > On Tue, Oct 27, 2020 at 5:57 AM Hangbin Liu wrote: >> On Tue, Oct 27, 2020 at 07:57:06AM +0000, Georg Kohmann (geokohma) wrote: >>>> + /* RFC 8200, Section 4.5 Fragment Header: >>>> +* If the first fragment doe

Re: [PATCHv5 net 2/2] IPv6: reply ICMP error if the first fragment don't include all headers

2020-10-27 Thread Georg Kohmann (geokohma)
On 27.10.2020 10:57, Hangbin Liu wrote: > On Tue, Oct 27, 2020 at 07:57:06AM +0000, Georg Kohmann (geokohma) wrote: >>> + /* RFC 8200, Section 4.5 Fragment Header: >>> +* If the first fragment does not include all headers through an >>> +* Upper-Layer header

Re: [PATCHv5 net 2/2] IPv6: reply ICMP error if the first fragment don't include all headers

2020-10-27 Thread Georg Kohmann (geokohma)
On 27.10.2020 03:28, Hangbin Liu wrote: > Based on RFC 8200, Section 4.5 Fragment Header: > > - If the first fragment does not include all headers through an > Upper-Layer header, then that fragment should be discarded and > an ICMP Parameter Problem, Code 3, message should be sent to

Re: [PATCHv4 net 2/2] IPv6: reply ICMP error if the first fragment don't include all headers

2020-10-26 Thread Georg Kohmann (geokohma)
On 26.10.2020 13:55, Hangbin Liu wrote: > On Mon, Oct 26, 2020 at 08:09:21AM +0000, Georg Kohmann (geokohma) wrote: >>> + nexthdr = hdr->nexthdr; >>> + offset = ipv6_skip_exthdr(skb, skb_transport_offset(skb), &nexthdr, >>> &frag_off); >>>

Re: [PATCHv4 net 2/2] IPv6: reply ICMP error if the first fragment don't include all headers

2020-10-26 Thread Georg Kohmann (geokohma)
On 26.10.2020 08:29, Hangbin Liu wrote: > Based on RFC 8200, Section 4.5 Fragment Header: > > - If the first fragment does not include all headers through an > Upper-Layer header, then that fragment should be discarded and > an ICMP Parameter Problem, Code 3, message should be sent to

[PATCH net V2] netfilter: Drop fragmented ndisc packets assembled in netfilter

2020-10-13 Thread Georg Kohmann
drop fragmented ndisc packets by default (RFC 6980)") Signed-off-by: Georg Kohmann --- V2: Fix spelling of IPSKB_FRAGMENTED to IP6SKB_FRAGMENTED in comment net/ipv6/netfilter/nf_conntrack_reasm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c

Re: [PATCH net] netfilter: Drop fragmented ndisc packets assembled in netfilter

2020-10-12 Thread Georg Kohmann (geokohma)
On 12.10.2020 14:56, Pablo Neira Ayuso wrote: > Please, Cc: netfilter-de...@vger.kernel.org for your netfilter > patches, so patchwork can catch it there too next time. Thank you, I will next time. > > On Mon, Oct 12, 2020 at 02:53:47PM +0200, Georg Kohmann wrote: >> Fragme

[PATCH net] netfilter: Drop fragmented ndisc packets assembled in netfilter

2020-10-12 Thread Georg Kohmann
drop fragmented ndisc packets by default (RFC 6980)") Signed-off-by: Georg Kohmann --- net/ipv6/netfilter/nf_conntrack_reasm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index fed9666..054d287 100644

[PATCH net] net:ipv6: Discard next-hop MTU less than minimum link MTU

2020-10-07 Thread Georg Kohmann
TU is less than the minimum link MTU. Signed-off-by: Georg Kohmann --- net/ipv6/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index fb075d9..27430d6 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2745,7 +2745,8 @@ s

[PATCH 4.4 stable 08/10] ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

2019-10-08 Thread Georg Kohmann
commit 70b095c84326 ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module") From: Florian Westphal IPV6=m DEFRAG_IPV6=m CONNTRACK=y yields: net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get': net/netfilter/nf_conntrack_proto.c:802: undefined reference to `nf_defrag_ipv6_e

[PATCH 4.4 stable 10/10] net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

2019-10-08 Thread Georg Kohmann
commit 997dd9647164 ("net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c") Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RF

[PATCH 4.4 stable 04/10] netfilter: ipv6: nf_defrag: Pass on packets to stack per RFC2460

2019-10-08 Thread Georg Kohmann
commit d65bc9545fd3 ("netfilter: ipv6: nf_defrag: Pass on packets to stack per RFC2460") Author: Subash Abhinov Kasiviswanathan Date: Fri Jan 12 17:36:27 2018 -0700 [ Upstream commit 83f1999caeb14e15df205e80d210699951733287 ] ipv6_defrag pulls network headers before fragment header. In case of

[PATCH 4.4 stable 07/10] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-10-08 Thread Georg Kohmann
commit c23f35d19db3 ("net: IP defrag: encapsulate rbtree defrag code into callable functions") This is a refactoring patch: without changing runtime behavior, it moves rbtree-related code from IPv4-specific files/functions into .h/.c defrag files shared with IPv6 defragmentation code. Signed-off-

[PATCH 4.4 stable 05/10] netfilter: ipv6: nf_defrag: fix NULL deref panic

2019-10-08 Thread Georg Kohmann
commit e97ac12859db ("netfilter: ipv6: nf_defrag: fix NULL deref panic") Author: Florian Westphal Date: Tue Dec 8 23:35:19 2015 +0100 Valdis reports NULL deref in nf_ct_frag6_gather. Problem is bogus use of skb_queue_walk() -- we miss first skb in the list since we start with head->next instead

[PATCH 4.4 stable 09/10] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-10-08 Thread Georg Kohmann
commit d4289fcc9b16 ("net: IP6 defrag: use rbtrees for IPv6 defrag") Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and a

[PATCH 4.4 stable 06/10] ipv6: frags: fix a lockdep false positive

2019-10-08 Thread Georg Kohmann
commit 415787d7799f ("ipv6: frags: fix a lockdep false positive") From: Eric Dumazet lockdep does not know that the locks used by IPv4 defrag and IPv6 reassembly units are of different classes. It complains because of following chains : 1) sch_direct_xmit()(lock txq->_xmit_lock) de

[PATCH 4.4 stable 01/10] netfilter: ipv6: nf_defrag: avoid/free clone operations

2019-10-08 Thread Georg Kohmann
commit 029f7f3b8701 ("netfilter: ipv6: nf_defrag: avoid/free clone operations") Author: Florian Westphal Date: Wed Nov 18 23:32:39 2015 +0100 commit 6aafeef03b9d9ecf ("netfilter: push reasm skb through instead of original frag skbs") changed ipv6 defrag to not use the original skbs anymore. So

[PATCH 4.4 stable 02/10] netfilter: ipv6: avoid nf_iterate recursion

2019-10-08 Thread Georg Kohmann
commit daaa7d647f81 ("netfilter: ipv6: avoid nf_iterate recursion") Author: Florian Westphal Date: Wed Nov 18 23:32:40 2015 +0100 The previous patch changed nf_ct_frag6_gather() to morph reassembled skb with the previous one. This means that the return value is always NULL or the skb argument.

[PATCH 4.4 stable 03/10] ipv6: do not increment mac header when it's unset

2019-10-08 Thread Georg Kohmann
commit b678aa578c9e ("ipv6: do not increment mac header when it's unset") Author: Jason A. Donenfeld Date: Fri Oct 21 18:28:25 2016 +0900 Otherwise we'll overflow the integer. This occurs when layer 3 tunneled packets are handed off to the IPv6 layer. Signed-off-by: Jason A. Donenfeld Signed-

[PATCH 4.4 stable 00/10] net: ip6 defrag: backport fixes

2019-10-08 Thread Georg Kohmann
This is a backport of a 5.1rc patchset: https://patchwork.ozlabs.org/cover/1029418/ Which was backported into 4.19: https://patchwork.ozlabs.org/cover/1081619/ and into 4.14: https://patchwork.ozlabs.org/cover/1089651/ and into 4.9: https://www.spinics.net/lists/netdev/msg567087.html T

[PATCH] ipv6: icmp: Updating pmtu for link local route

2018-08-02 Thread Georg Kohmann
tination can to appear to be directly connected but is in fact more than one hop away." Using the interface index from the incoming ICMPV6_PKT_TOOBIG when updating the pmtu. Signed-off-by: Georg Kohmann --- net/ipv6/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/n

[PATCH] ipv6: icmp: Updating pmtu for link local route

2018-07-06 Thread Georg Kohmann
destination can to appear to be directly connected but is in fact more than one hop away." Using the interface index from the incoming ICMPV6_PKT_TOOBIG when updating the pmtu. Signed-off-by: Georg Kohmann ---  net/ipv6/icmp.c | 2 +-  1 file changed, 1 insertion(+), 1 deletion(-) d