Skip to contentSkip to conversation

netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure

PATCH Applied Subash Abhinov Kasiviswanathan 2 participants 2 messages Jan 31, 2018 – Feb 2, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure

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")

---
Hi Pablo
This needs to be picked up for 4.16

---
 net/ipv6/netfilter/nf_conntrack_reasm.c | 1 +
 1 file changed, 1 insertion(+)
net/ipv6/netfilter/nf_conntrack_reasm.c +1 -0
index ce53dcf..b84ce3e 100644
@@ -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) {
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 7 lines · 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.

Applied, thanks Subash.