Skip to contentSkip to conversation

xt_tcpudp.c match unregistration bug

PATCH Applied Yuri Gushin 2 participants 2 messages Jun 12, 2006 – Jun 19, 2006

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

PATCH 1/1 xt_tcpudp.c match unregistration bug

Hi all,

There is a match unregistration bug in the __init function of xt_tcpudp.c;

"xt_unregister_match(AF_INET, &tcp_matchstruct)" is called twice, leaving "udp_matchstruct" registered, in case of a failure in the registration of the udp6 structure.

Attached is a patch to resolve this issue.

net/netfilter/xt_tcpudp.c 2006-06-11 17:41:20.000000000 +0300 renamed from net/netfilter/xt_tcpudp.c 2006-05-31 03:31:44.000000000 +0300 +1 -1
@@ -314,7 +314,7 @@
        return ret;
 
 out_unreg_udp:
-       xt_unregister_match(AF_INET, &tcp_matchstruct);
+       xt_unregister_match(AF_INET, &udp_matchstruct);
 out_unreg_tcp6:
        xt_unregister_match(AF_INET6, &tcp6_matchstruct);
 out_unreg_tcp:
#1 lore raw
Quoted 9 lines · Yuri Gushin

Hi all,

There is a match unregistration bug in the __init function of xt_tcpudp.c;

"xt_unregister_match(AF_INET, &tcp_matchstruct)" is called twice, leaving "udp_matchstruct" registered, in case of a failure in the registration of the udp6 structure.

Attached is a patch to resolve this issue.

Applied. thanks.