All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf-next] netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure
@ 2018-01-31 11:50 Subash Abhinov Kasiviswanathan
  2018-02-02 17:28 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Subash Abhinov Kasiviswanathan @ 2018-01-31 11:50 UTC (permalink / raw)
  To: pablo, netfilter-devel, fw; +Cc: Subash Abhinov Kasiviswanathan

Failures were seen in ICMPv6 fragmentation timeout tests if they were
run after the RFC2460 failure tests. Kernel was not sending out the
ICMPv6 fragment reassembly time exceeded packet after the fragmentation
reassembly timeout of 1 minute had elapsed.

This happened because the frag queue was not released if an error in
IPv6 fragmentation header was detected by RFC2460.

Fixes: 83f1999caeb1 ("netfilter: ipv6: nf_defrag: Pass on packets to stack per RFC2460")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
---
Hi Pablo
This needs to be picked up for 4.16
---
 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 ce53dcf..b84ce3e 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -264,6 +264,7 @@ static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
 			 * this case. -DaveM
 			 */
 			pr_debug("end of fragment not rounded to 8 bytes.\n");
+			inet_frag_kill(&fq->q, &nf_frags);
 			return -EPROTO;
 		}
 		if (end > fq->q.len) {
-- 
1.9.1


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

* Re: [PATCH nf-next] netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure
  2018-01-31 11:50 [PATCH nf-next] netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure Subash Abhinov Kasiviswanathan
@ 2018-02-02 17:28 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2018-02-02 17:28 UTC (permalink / raw)
  To: Subash Abhinov Kasiviswanathan; +Cc: netfilter-devel, fw

On Wed, Jan 31, 2018 at 04:50:01AM -0700, Subash Abhinov Kasiviswanathan wrote:
> Failures were seen in ICMPv6 fragmentation timeout tests if they were
> run after the RFC2460 failure tests. Kernel was not sending out the
> ICMPv6 fragment reassembly time exceeded packet after the fragmentation
> reassembly timeout of 1 minute had elapsed.
> 
> This happened because the frag queue was not released if an error in
> IPv6 fragmentation header was detected by RFC2460.

Applied, thanks Subash.

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

end of thread, other threads:[~2018-02-02 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31 11:50 [PATCH nf-next] netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure Subash Abhinov Kasiviswanathan
2018-02-02 17:28 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.