Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
* Re: [PATCH net] netfilter: Drop fragmented ndisc packets assembled in netfilter
       [not found] <20201012125347.13011-1-geokohma@cisco.com>
@ 2020-10-12 12:56 ` Pablo Neira Ayuso
  2020-10-12 14:22   ` Georg Kohmann (geokohma)
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2020-10-12 12:56 UTC (permalink / raw)
  To: Georg Kohmann
  Cc: netdev, kadlec, fw, davem, kuznet, yoshfuji, kuba, netfilter-devel

Please, Cc: netfilter-devel@vger.kernel.org for your netfilter
patches, so patchwork can catch it there too next time.

On Mon, Oct 12, 2020 at 02:53:47PM +0200, Georg Kohmann wrote:
> Fragmented ndisc packets assembled in netfilter not dropped as specified
> in RFC 6980, section 5. This behaviour breaks TAHI IPv6 Core Conformance
> Tests v6LC.2.1.22/23, V6LC.2.2.26/27 and V6LC.2.3.18.
> 
> Setting IPSKB_FRAGMENTED flag during reassembly.
> 
> References: commit b800c3b966bc ("ipv6: drop fragmented ndisc packets by
> default (RFC 6980)")
> Signed-off-by: Georg Kohmann <geokohma@cisco.com>
> ---
>  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
> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
> @@ -355,6 +355,7 @@ static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb,
>  	ipv6_hdr(skb)->payload_len = htons(payload_len);
>  	ipv6_change_dsfield(ipv6_hdr(skb), 0xff, ecn);
>  	IP6CB(skb)->frag_max_size = sizeof(struct ipv6hdr) + fq->q.max_size;
> +	IP6CB(skb)->flags |= IP6SKB_FRAGMENTED;
>  
>  	/* Yes, and fold redundant checksum back. 8) */
>  	if (skb->ip_summed == CHECKSUM_COMPLETE)
> -- 
> 2.10.2
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net] netfilter: Drop fragmented ndisc packets assembled in netfilter
  2020-10-12 12:56 ` [PATCH net] netfilter: Drop fragmented ndisc packets assembled in netfilter Pablo Neira Ayuso
@ 2020-10-12 14:22   ` Georg Kohmann (geokohma)
  0 siblings, 0 replies; 2+ messages in thread
From: Georg Kohmann (geokohma) @ 2020-10-12 14:22 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: netdev, kadlec, fw, davem, kuznet, yoshfuji, kuba, netfilter-devel

On 12.10.2020 14:56, Pablo Neira Ayuso wrote:
> Please, Cc: netfilter-devel@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:
>> Fragmented ndisc packets assembled in netfilter not dropped as specified
>> in RFC 6980, section 5. This behaviour breaks TAHI IPv6 Core Conformance
>> Tests v6LC.2.1.22/23, V6LC.2.2.26/27 and V6LC.2.3.18.
>>
>> Setting IPSKB_FRAGMENTED flag during reassembly.
>>
>> References: commit b800c3b966bc ("ipv6: drop fragmented ndisc packets by
>> default (RFC 6980)")
>> Signed-off-by: Georg Kohmann <geokohma@cisco.com>
>> ---
>>  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
>> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
>> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
>> @@ -355,6 +355,7 @@ static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb,
>>  	ipv6_hdr(skb)->payload_len = htons(payload_len);
>>  	ipv6_change_dsfield(ipv6_hdr(skb), 0xff, ecn);
>>  	IP6CB(skb)->frag_max_size = sizeof(struct ipv6hdr) + fq->q.max_size;
>> +	IP6CB(skb)->flags |= IP6SKB_FRAGMENTED;
>>  
>>  	/* Yes, and fold redundant checksum back. 8) */
>>  	if (skb->ip_summed == CHECKSUM_COMPLETE)
>> -- 
>> 2.10.2
>>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20201012125347.13011-1-geokohma@cisco.com>
2020-10-12 12:56 ` [PATCH net] netfilter: Drop fragmented ndisc packets assembled in netfilter Pablo Neira Ayuso
2020-10-12 14:22   ` Georg Kohmann (geokohma)

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git