List Info

Thread: xt_tcpudp.c match unregistration bug




xt_tcpudp.c match unregistration bug
user name
2006-06-12 07:35:06
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.

Signed-off-by: Yuri Gushin <yuriecl-labs.org>


--- a/net/netfilter/xt_tcpudp.c 2006-05-31
03:31:44.000000000 +0300
+++ b/net/netfilter/xt_tcpudp.c 2006-06-11
17:41:20.000000000 +0300
 -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:


xt_tcpudp.c match unregistration bug
user name
2006-06-19 15:00:03
Yuri Gushin wrote:
> 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.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )