[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080703090403.GA27923@gondor.apana.org.au>
Date: Thu, 3 Jul 2008 17:04:03 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Steffen Klassert <steffen.klassert@...unet.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
klassert@...hematik.tu-chemnitz.de
Subject: Re: [PATCH] xfrm: Fix possible error pointer dereference
On Thu, Jul 03, 2008 at 10:48:36AM +0200, Steffen Klassert wrote:
> Check for error befor dereferencing xdst in xfrm_bundle_create.
>
> Signed-off-by: Steffen Klassert <steffen.klassert@...unet.com>
> ---
> net/xfrm/xfrm_policy.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
> index cae9fd8..9fab591 100644
> --- a/net/xfrm/xfrm_policy.c
> +++ b/net/xfrm/xfrm_policy.c
> @@ -1384,6 +1384,7 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
> struct net_device *dev;
> struct dst_entry *dst_prev = NULL;
> struct dst_entry *dst0 = NULL;
> + struct dst_entry *dst1 = NULL;
> int i = 0;
> int err;
> int header_len = 0;
> @@ -1404,7 +1405,6 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
>
> for (; i < nx; i++) {
> struct xfrm_dst *xdst = xfrm_alloc_dst(family);
> - struct dst_entry *dst1 = &xdst->u.dst;
Please check again, we're not dereferencing it here.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists