1 From 3b05ac3824ed9648c0d9c02d51d9b54e4e7e874f Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Sat, 6 Dec 2014 16:49:24 +0300
4 Subject: ipvs: uninitialized data with IP_VS_IPV6
6 From: Dan Carpenter <dan.carpenter@oracle.com>
8 commit 3b05ac3824ed9648c0d9c02d51d9b54e4e7e874f upstream.
10 The app_tcp_pkt_out() function expects "*diff" to be set and ends up
11 using uninitialized data if CONFIG_IP_VS_IPV6 is turned on.
13 The same issue is there in app_tcp_pkt_in(). Thanks to Julian Anastasov
16 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
17 Acked-by: Julian Anastasov <ja@ssi.bg>
18 Signed-off-by: Simon Horman <horms@verge.net.au>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 net/netfilter/ipvs/ip_vs_ftp.c | 10 +++++-----
23 1 file changed, 5 insertions(+), 5 deletions(-)
25 --- a/net/netfilter/ipvs/ip_vs_ftp.c
26 +++ b/net/netfilter/ipvs/ip_vs_ftp.c
27 @@ -183,6 +183,8 @@ static int ip_vs_ftp_out(struct ip_vs_ap
33 #ifdef CONFIG_IP_VS_IPV6
34 /* This application helper doesn't work with IPv6 yet,
35 * so turn this into a no-op for IPv6 packets
36 @@ -191,8 +193,6 @@ static int ip_vs_ftp_out(struct ip_vs_ap
42 /* Only useful for established sessions */
43 if (cp->state != IP_VS_TCP_S_ESTABLISHED)
45 @@ -321,6 +321,9 @@ static int ip_vs_ftp_in(struct ip_vs_app
46 struct ip_vs_conn *n_cp;
49 + /* no diff required for incoming packets */
52 #ifdef CONFIG_IP_VS_IPV6
53 /* This application helper doesn't work with IPv6 yet,
54 * so turn this into a no-op for IPv6 packets
55 @@ -329,9 +332,6 @@ static int ip_vs_ftp_in(struct ip_vs_app
59 - /* no diff required for incoming packets */
62 /* Only useful for established sessions */
63 if (cp->state != IP_VS_TCP_S_ESTABLISHED)