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

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/ea23d5e3bf340e413b8e05c13da233c99c64142b
Commit:     ea23d5e3bf340e413b8e05c13da233c99c64142b
Parent:     0537250fdc6c876ed4cbbe874c739aebef493ee2
Refname:    refs/heads/master
Author:     Subash Abhinov Kasiviswanathan <[email protected]>
AuthorDate: Wed Jan 31 04:50:01 2018 -0700
Committer:  Pablo Neira Ayuso <[email protected]>
CommitDate: Fri Feb 2 12:45:17 2018 +0100

    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")
    Signed-off-by: Subash Abhinov Kasiviswanathan <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
---
 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 ce53dcfda88a..b84ce3e6d728 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) {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.