public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-atm-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, jirislaby@gmail.com
Subject: Re: [PATCH 1/1] ATM: mpc, fix use after free
Date: Mon, 11 Oct 2010 10:59:40 +0200	[thread overview]
Message-ID: <1286787580.2737.4.camel@edumazet-laptop> (raw)
In-Reply-To: <1286786794-10410-1-git-send-email-jslaby@suse.cz>

Le lundi 11 octobre 2010 à 10:46 +0200, Jiri Slaby a écrit :
> Stanse found that mpc_push frees skb and then it dereferences it. It
> is a typo, new_skb should be dereferenced there.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> ---
>  net/atm/mpc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/atm/mpc.c b/net/atm/mpc.c
> index 622b471..74bcc66 100644
> --- a/net/atm/mpc.c
> +++ b/net/atm/mpc.c
> @@ -778,7 +778,7 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
>  	eg->packets_rcvd++;
>  	mpc->eg_ops->put(eg);
>  
> -	memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
> +	memset(ATM_SKB(new_skb), 0, sizeof(struct atm_skb_data));
>  	netif_rx(new_skb);
>  }
>  

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

  reply	other threads:[~2010-10-11  8:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11  7:56 [HELP] ATM: mpc, use-after-free Jiri Slaby
2010-10-11  8:18 ` Eric Dumazet
2010-10-11  8:46   ` [PATCH 1/1] ATM: mpc, fix use after free Jiri Slaby
2010-10-11  8:59     ` Eric Dumazet [this message]
2010-10-11 18:12       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286787580.2737.4.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jirislaby@gmail.com \
    --cc=jslaby@suse.cz \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox