* [patch] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-03 10:12 ` Dan Carpenter 0 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-03 10:12 UTC (permalink / raw) To: Wensong Zhang Cc: Simon Horman, Julian Anastasov, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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. 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; ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [patch] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-03 10:12 ` Dan Carpenter 0 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-03 10:12 UTC (permalink / raw) To: Wensong Zhang Cc: Simon Horman, Julian Anastasov, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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. 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; ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [patch] ipvs: uninitialized data with IP_VS_IPV6 2014-12-03 10:12 ` Dan Carpenter @ 2014-12-04 21:19 ` Julian Anastasov -1 siblings, 0 replies; 17+ messages in thread From: Julian Anastasov @ 2014-12-04 21:19 UTC (permalink / raw) To: Dan Carpenter Cc: Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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> ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-04 21:19 ` Julian Anastasov 0 siblings, 0 replies; 17+ messages in thread From: Julian Anastasov @ 2014-12-04 21:19 UTC (permalink / raw) To: Dan Carpenter Cc: Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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> ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch] ipvs: uninitialized data with IP_VS_IPV6 2014-12-04 21:19 ` Julian Anastasov @ 2014-12-05 7:25 ` Dan Carpenter -1 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-05 7:25 UTC (permalink / raw) To: Julian Anastasov Cc: Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-05 7:25 ` Dan Carpenter 0 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-05 7:25 UTC (permalink / raw) To: Julian Anastasov Cc: Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch v2] ipvs: uninitialized data with IP_VS_IPV6 2014-12-04 21:19 ` Julian Anastasov @ 2014-12-06 13:49 ` Dan Carpenter -1 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-06 13:49 UTC (permalink / raw) To: Wensong Zhang Cc: Simon Horman, Julian Anastasov, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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. The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov for noticing that. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- v2: fix app_tcp_pkt_in() as well. This is an old bug. diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c index 1d5341f..5d3daae 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; @@ -322,6 +322,9 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, struct ip_vs_conn *n_cp; struct net *net; + /* no diff required for incoming packets */ + *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 @@ -330,9 +333,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, return 1; #endif - /* no diff required for incoming packets */ - *diff = 0; - /* Only useful for established sessions */ if (cp->state != IP_VS_TCP_S_ESTABLISHED) return 1; ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [patch v2] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-06 13:49 ` Dan Carpenter 0 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-06 13:49 UTC (permalink / raw) To: Wensong Zhang Cc: Simon Horman, Julian Anastasov, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors 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. The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov for noticing that. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- v2: fix app_tcp_pkt_in() as well. This is an old bug. diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c index 1d5341f..5d3daae 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; @@ -322,6 +322,9 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, struct ip_vs_conn *n_cp; struct net *net; + /* no diff required for incoming packets */ + *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 @@ -330,9 +333,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, return 1; #endif - /* no diff required for incoming packets */ - *diff = 0; ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 2014-12-06 13:49 ` Dan Carpenter @ 2014-12-07 18:39 ` Julian Anastasov -1 siblings, 0 replies; 17+ messages in thread From: Julian Anastasov @ 2014-12-07 18:39 UTC (permalink / raw) To: Dan Carpenter Cc: Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors Hello, On Sat, 6 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. > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > for noticing that. > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > --- > v2: fix app_tcp_pkt_in() as well. This is an old bug. Thanks! It will not break seqs for IPv6 control connection, only that we do not support FTP yet :( I have the doubt whether this should be classified as bugfix :) I guess, it is a net-next material, right? Simon, please apply. Acked-by: Julian Anastasov <ja@ssi.bg> > diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c > index 1d5341f..5d3daae 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; > @@ -322,6 +322,9 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > struct ip_vs_conn *n_cp; > struct net *net; > > + /* no diff required for incoming packets */ > + *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 > @@ -330,9 +333,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > return 1; > #endif > > - /* no diff required for incoming packets */ > - *diff = 0; > - > /* Only useful for established sessions */ > if (cp->state != IP_VS_TCP_S_ESTABLISHED) > return 1; Regards -- Julian Anastasov <ja@ssi.bg> ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-07 18:39 ` Julian Anastasov 0 siblings, 0 replies; 17+ messages in thread From: Julian Anastasov @ 2014-12-07 18:39 UTC (permalink / raw) To: Dan Carpenter Cc: Wensong Zhang, Simon Horman, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors Hello, On Sat, 6 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. > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > for noticing that. > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > --- > v2: fix app_tcp_pkt_in() as well. This is an old bug. Thanks! It will not break seqs for IPv6 control connection, only that we do not support FTP yet :( I have the doubt whether this should be classified as bugfix :) I guess, it is a net-next material, right? Simon, please apply. Acked-by: Julian Anastasov <ja@ssi.bg> > diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c > index 1d5341f..5d3daae 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; > @@ -322,6 +322,9 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > struct ip_vs_conn *n_cp; > struct net *net; > > + /* no diff required for incoming packets */ > + *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 > @@ -330,9 +333,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > return 1; > #endif > > - /* no diff required for incoming packets */ > - *diff = 0; > - > /* Only useful for established sessions */ > if (cp->state != IP_VS_TCP_S_ESTABLISHED) > return 1; Regards -- Julian Anastasov <ja@ssi.bg> ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 2014-12-07 18:39 ` Julian Anastasov @ 2014-12-09 0:52 ` Simon Horman -1 siblings, 0 replies; 17+ messages in thread From: Simon Horman @ 2014-12-09 0:52 UTC (permalink / raw) To: Julian Anastasov Cc: Dan Carpenter, Wensong Zhang, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors On Sun, Dec 07, 2014 at 08:39:35PM +0200, Julian Anastasov wrote: > > Hello, > > On Sat, 6 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. > > > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > > for noticing that. > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > --- > > v2: fix app_tcp_pkt_in() as well. This is an old bug. > > Thanks! It will not break seqs for IPv6 control > connection, only that we do not support FTP yet :( I have > the doubt whether this should be classified as bugfix :) > I guess, it is a net-next material, right? Agreed, I have queued it up in ipvs-next. I'll send a pull request to Pablo if Dan doesn't object to it going there. > Simon, please apply. > > Acked-by: Julian Anastasov <ja@ssi.bg> > > > diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c > > index 1d5341f..5d3daae 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; > > @@ -322,6 +322,9 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > > struct ip_vs_conn *n_cp; > > struct net *net; > > > > + /* no diff required for incoming packets */ > > + *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 > > @@ -330,9 +333,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > > return 1; > > #endif > > > > - /* no diff required for incoming packets */ > > - *diff = 0; > > - > > /* Only useful for established sessions */ > > if (cp->state != IP_VS_TCP_S_ESTABLISHED) > > return 1; > > Regards > > -- > Julian Anastasov <ja@ssi.bg> > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-09 0:52 ` Simon Horman 0 siblings, 0 replies; 17+ messages in thread From: Simon Horman @ 2014-12-09 0:52 UTC (permalink / raw) To: Julian Anastasov Cc: Dan Carpenter, Wensong Zhang, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors On Sun, Dec 07, 2014 at 08:39:35PM +0200, Julian Anastasov wrote: > > Hello, > > On Sat, 6 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. > > > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > > for noticing that. > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > --- > > v2: fix app_tcp_pkt_in() as well. This is an old bug. > > Thanks! It will not break seqs for IPv6 control > connection, only that we do not support FTP yet :( I have > the doubt whether this should be classified as bugfix :) > I guess, it is a net-next material, right? Agreed, I have queued it up in ipvs-next. I'll send a pull request to Pablo if Dan doesn't object to it going there. > Simon, please apply. > > Acked-by: Julian Anastasov <ja@ssi.bg> > > > diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c > > index 1d5341f..5d3daae 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; > > @@ -322,6 +322,9 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > > struct ip_vs_conn *n_cp; > > struct net *net; > > > > + /* no diff required for incoming packets */ > > + *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 > > @@ -330,9 +333,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > > return 1; > > #endif > > > > - /* no diff required for incoming packets */ > > - *diff = 0; > > - > > /* Only useful for established sessions */ > > if (cp->state != IP_VS_TCP_S_ESTABLISHED) > > return 1; > > Regards > > -- > Julian Anastasov <ja@ssi.bg> > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 2014-12-09 0:52 ` Simon Horman @ 2014-12-09 6:49 ` Dan Carpenter -1 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-09 6:49 UTC (permalink / raw) To: Simon Horman Cc: Julian Anastasov, Wensong Zhang, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors On Tue, Dec 09, 2014 at 09:52:15AM +0900, Simon Horman wrote: > On Sun, Dec 07, 2014 at 08:39:35PM +0200, Julian Anastasov wrote: > > > > Hello, > > > > On Sat, 6 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. > > > > > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > > > for noticing that. > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > --- > > > v2: fix app_tcp_pkt_in() as well. This is an old bug. > > > > Thanks! It will not break seqs for IPv6 control > > connection, only that we do not support FTP yet :( I have > > the doubt whether this should be classified as bugfix :) > > I guess, it is a net-next material, right? > > Agreed, I have queued it up in ipvs-next. > I'll send a pull request to Pablo if Dan doesn't object > to it going there. No objections from me. regards, dan carpenter ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-09 6:49 ` Dan Carpenter 0 siblings, 0 replies; 17+ messages in thread From: Dan Carpenter @ 2014-12-09 6:49 UTC (permalink / raw) To: Simon Horman Cc: Julian Anastasov, Wensong Zhang, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors On Tue, Dec 09, 2014 at 09:52:15AM +0900, Simon Horman wrote: > On Sun, Dec 07, 2014 at 08:39:35PM +0200, Julian Anastasov wrote: > > > > Hello, > > > > On Sat, 6 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. > > > > > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > > > for noticing that. > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > --- > > > v2: fix app_tcp_pkt_in() as well. This is an old bug. > > > > Thanks! It will not break seqs for IPv6 control > > connection, only that we do not support FTP yet :( I have > > the doubt whether this should be classified as bugfix :) > > I guess, it is a net-next material, right? > > Agreed, I have queued it up in ipvs-next. > I'll send a pull request to Pablo if Dan doesn't object > to it going there. No objections from me. regards, dan carpenter ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 2014-12-09 6:49 ` Dan Carpenter @ 2014-12-10 8:47 ` Simon Horman -1 siblings, 0 replies; 17+ messages in thread From: Simon Horman @ 2014-12-10 8:47 UTC (permalink / raw) To: Dan Carpenter Cc: Julian Anastasov, Wensong Zhang, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors On Tue, Dec 09, 2014 at 09:49:47AM +0300, Dan Carpenter wrote: > On Tue, Dec 09, 2014 at 09:52:15AM +0900, Simon Horman wrote: > > On Sun, Dec 07, 2014 at 08:39:35PM +0200, Julian Anastasov wrote: > > > > > > Hello, > > > > > > On Sat, 6 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. > > > > > > > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > > > > for noticing that. > > > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > --- > > > > v2: fix app_tcp_pkt_in() as well. This is an old bug. > > > > > > Thanks! It will not break seqs for IPv6 control > > > connection, only that we do not support FTP yet :( I have > > > the doubt whether this should be classified as bugfix :) > > > I guess, it is a net-next material, right? > > > > Agreed, I have queued it up in ipvs-next. > > I'll send a pull request to Pablo if Dan doesn't object > > to it going there. > > No objections from me. Thanks, I have sent a pull-request. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [patch v2] ipvs: uninitialized data with IP_VS_IPV6 @ 2014-12-10 8:47 ` Simon Horman 0 siblings, 0 replies; 17+ messages in thread From: Simon Horman @ 2014-12-10 8:47 UTC (permalink / raw) To: Dan Carpenter Cc: Julian Anastasov, Wensong Zhang, Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, David S. Miller, netdev, lvs-devel, netfilter-devel, coreteam, kernel-janitors On Tue, Dec 09, 2014 at 09:49:47AM +0300, Dan Carpenter wrote: > On Tue, Dec 09, 2014 at 09:52:15AM +0900, Simon Horman wrote: > > On Sun, Dec 07, 2014 at 08:39:35PM +0200, Julian Anastasov wrote: > > > > > > Hello, > > > > > > On Sat, 6 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. > > > > > > > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > > > > for noticing that. > > > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > --- > > > > v2: fix app_tcp_pkt_in() as well. This is an old bug. > > > > > > Thanks! It will not break seqs for IPv6 control > > > connection, only that we do not support FTP yet :( I have > > > the doubt whether this should be classified as bugfix :) > > > I guess, it is a net-next material, right? > > > > Agreed, I have queued it up in ipvs-next. > > I'll send a pull request to Pablo if Dan doesn't object > > to it going there. > > No objections from me. Thanks, I have sent a pull-request. ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <1422270525-4353-1-git-send-email-pablo@netfilter.org>]
* Re: [PATCH] ipvs: uninitialized data with IP_VS_IPV6 [not found] <1422270525-4353-1-git-send-email-pablo@netfilter.org> @ 2015-05-04 23:32 ` Ben Hutchings 0 siblings, 0 replies; 17+ messages in thread From: Ben Hutchings @ 2015-05-04 23:32 UTC (permalink / raw) To: Pablo Neira Ayuso; +Cc: stable, Dan Carpenter, Simon Horman [-- Attachment #1: Type: text/plain, Size: 2489 bytes --] On Mon, 2015-01-26 at 12:08 +0100, Pablo Neira Ayuso wrote: > From: Dan Carpenter <dan.carpenter@oracle.com> > > [ upstream commit 3b05ac3824ed9648c0d9c02d51d9b54e4e7e874f ] > > 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. > > The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov > for noticing that. Queued up for 3.2, thanks. Ben. > Cc: <stable@vger.kernel.org> # 3.2.x > Cc: <stable@vger.kernel.org> # 3.4.x > Cc: <stable@vger.kernel.org> # 3.10.x > Cc: <stable@vger.kernel.org> # 3.14.x > Cc: <stable@vger.kernel.org> # 3.17.x > Cc: <stable@vger.kernel.org> # 3.18.x > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > Acked-by: Julian Anastasov <ja@ssi.bg> > Signed-off-by: Simon Horman <horms@verge.net.au> > --- > net/netfilter/ipvs/ip_vs_ftp.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c > index 1d5341f..5d3daae 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; > @@ -322,6 +322,9 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > struct ip_vs_conn *n_cp; > struct net *net; > > + /* no diff required for incoming packets */ > + *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 > @@ -330,9 +333,6 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, > return 1; > #endif > > - /* no diff required for incoming packets */ > - *diff = 0; > - > /* Only useful for established sessions */ > if (cp->state != IP_VS_TCP_S_ESTABLISHED) > return 1; -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse. [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 811 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2015-05-04 23:32 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 10:12 [patch] ipvs: uninitialized data with IP_VS_IPV6 Dan Carpenter
2014-12-03 10:12 ` Dan Carpenter
2014-12-04 21:19 ` Julian Anastasov
2014-12-04 21:19 ` Julian Anastasov
2014-12-05 7:25 ` Dan Carpenter
2014-12-05 7:25 ` Dan Carpenter
2014-12-06 13:49 ` [patch v2] " Dan Carpenter
2014-12-06 13:49 ` Dan Carpenter
2014-12-07 18:39 ` Julian Anastasov
2014-12-07 18:39 ` Julian Anastasov
2014-12-09 0:52 ` Simon Horman
2014-12-09 0:52 ` Simon Horman
2014-12-09 6:49 ` Dan Carpenter
2014-12-09 6:49 ` Dan Carpenter
2014-12-10 8:47 ` Simon Horman
2014-12-10 8:47 ` Simon Horman
[not found] <1422270525-4353-1-git-send-email-pablo@netfilter.org>
2015-05-04 23:32 ` [PATCH] " Ben Hutchings
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.