LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH net-next] ipvs: Avoid null-pointer deref in debug code

To: Alex Gartrell <agartrell@xxxxxx>
Subject: Re: [PATCH net-next] ipvs: Avoid null-pointer deref in debug code
Cc: horms@xxxxxxxxxxxx, dan.carpenter@xxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, kernel-team@xxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Mon, 6 Oct 2014 22:01:08 +0300 (EEST)
        Hello,

On Mon, 6 Oct 2014, Alex Gartrell wrote:

> Use daddr instead of reaching into dest.
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Alex Gartrell <agartrell@xxxxxx>

        Thanks!

Acked-by: Julian Anastasov <ja@xxxxxx>

> ---
>  net/netfilter/ipvs/ip_vs_xmit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
> index 91f17c1..437a366 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
> @@ -316,7 +316,7 @@ __ip_vs_get_out_rt(int skb_af, struct sk_buff *skb, 
> struct ip_vs_dest *dest,
>       if (unlikely(crosses_local_route_boundary(skb_af, skb, rt_mode,
>                                                 local))) {
>               IP_VS_DBG_RL("We are crossing local and non-local addresses"
> -                          " daddr=%pI4\n", &dest->addr.ip);
> +                          " daddr=%pI4\n", &daddr);
>               goto err_put;
>       }
>  
> @@ -458,7 +458,7 @@ __ip_vs_get_out_rt_v6(int skb_af, struct sk_buff *skb, 
> struct ip_vs_dest *dest,
>       if (unlikely(crosses_local_route_boundary(skb_af, skb, rt_mode,
>                                                 local))) {
>               IP_VS_DBG_RL("We are crossing local and non-local addresses"
> -                          " daddr=%pI6\n", &dest->addr.in6);
> +                          " daddr=%pI6\n", daddr);
>               goto err_put;
>       }
>  
> -- 
> Alex Gartrell <agartrell@xxxxxx>

Regards

--
Julian Anastasov <ja@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>