Message ID | 20141203101213.GC29583@mwanda |
---|---|
State | Changes Requested |
Delegated to: | Pablo Neira |
Headers | show |
Hello, On Wed, 3 Dec 2014, Dan Carpenter wrote: > The app_tcp_pkt_out() function expects "*diff" to be set and ends up > using uninitialized data if CONFIG_IP_VS_IPV6 is turned on. > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > --- > This bug is very old. I guess ip_vs_ftp_in() needs the same fix? Regards -- Julian Anastasov <ja@ssi.bg> -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 04, 2014 at 11:19:34PM +0200, Julian Anastasov wrote: > > I guess ip_vs_ftp_in() needs the same fix? Good catch. Thanks for noticing that. I'll send a v2. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c index 1d5341f..f93f974 100644 --- a/net/netfilter/ipvs/ip_vs_ftp.c +++ b/net/netfilter/ipvs/ip_vs_ftp.c @@ -183,6 +183,8 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, struct nf_conn *ct; struct net *net; + *diff = 0; + #ifdef CONFIG_IP_VS_IPV6 /* This application helper doesn't work with IPv6 yet, * so turn this into a no-op for IPv6 packets @@ -191,8 +193,6 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, return 1; #endif - *diff = 0; - /* Only useful for established sessions */ if (cp->state != IP_VS_TCP_S_ESTABLISHED) return 1;
The app_tcp_pkt_out() function expects "*diff" to be set and ends up using uninitialized data if CONFIG_IP_VS_IPV6 is turned on. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- This bug is very old. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html