lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081031042920.GA6101@gondor.apana.org.au>
Date:	Fri, 31 Oct 2008 12:29:20 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	David Miller <davem@...emloft.net>, Jeff Garzik <jeff@...zik.org>,
	netdev@...r.kernel.org
Subject: Re: [PATCH] pppoe: Add missing sock_put() in pppoe_rcv()

On Thu, Oct 30, 2008 at 08:57:25AM +0000, Jarek Poplawski wrote:
>
> diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
> index fc6f4b8..c074276 100644
> --- a/drivers/net/pppoe.c
> +++ b/drivers/net/pppoe.c
> @@ -403,8 +403,10 @@ static int pppoe_rcv(struct sk_buff *skb,
>  	if (!po)
>  		goto drop;
>  
> -	if (pskb_trim_rcsum(skb, len))
> +	if (pskb_trim_rcsum(skb, len)) {
> +		sock_put(sk_pppox(po));
>  		goto drop;
> +	}

Actually we might be better off moving the trim before the get_item
call.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ