]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
netfilter: layer7 fix wrong fuzzy match change
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 6 Mar 2017 07:50:15 +0000 (08:50 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 12 Dec 2022 17:13:44 +0000 (18:13 +0100)
patch has applied one hunk to a wrong place.
This result in double free and crash the kernel.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
net/netfilter/nf_conntrack_core.c

index 23b3fedd619a5dd4c519bb389ceab16d4e358677..1f62cfa4b9a05908c65ab2308a8266f20ab6f0ec 100644 (file)
@@ -604,6 +604,13 @@ void nf_ct_destroy(struct nf_conntrack *nfct)
         */
        nf_ct_remove_expectations(ct);
 
+#if defined(CONFIG_NETFILTER_XT_MATCH_LAYER7) || defined(CONFIG_NETFILTER_XT_MATCH_LAYER7_MODULE)
+       if(ct->layer7.app_proto)
+               kfree(ct->layer7.app_proto);
+       if(ct->layer7.app_data)
+               kfree(ct->layer7.app_data);
+#endif
+
        if (ct->master)
                nf_ct_put(ct->master);