All of lore.kernel.org
 help / color / mirror / Atom feed
From: dmorris <dmorris@metavize.com>
To: Harald Welte <laforge@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] ipt_do_table accesss pskb after it has been freed
Date: Fri, 07 Nov 2003 08:09:35 -0800	[thread overview]
Message-ID: <3FABC3BF.7070808@metavize.com> (raw)
In-Reply-To: <20031107085752.GH5741@sunbeam.de.gnumonks.org>

Harald Welte wrote:

>>I had a target in the mangle/PREROUTING that was freeing the skb and 
>>returning NF_STOLEN.
>>ipt_do_table would then cause a kernel panic as it accesses the skb 
>>after its freed.
>>
>>Is this a bug? If so, here's the patch.
>>    
>>
>
>no, it's not a bug.  you should return NF_DROP if you want to have the
>skb dropped.
>
What am I supposed to do if there is no skb to be dropped.
My hook calls some other functions in the kernel which call
skb_free if all is not well.
That leaves me with two choices, either make a copy of the skb,
which i cant do for performance reasons, or apply this patch.

Do I have other options?
Does the netfilter code assume that skb_free cannot be called from 
within hooks?
and do you see any unintended consequences of this hack?

-dirk

  reply	other threads:[~2003-11-07 16:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-07  2:18 [PATCH] ipt_do_table accesss pskb after it has been freed Dirk Morris
2003-11-07  8:57 ` Harald Welte
2003-11-07 16:09   ` dmorris [this message]
2003-11-07 18:18     ` Henrik Nordstrom

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=3FABC3BF.7070808@metavize.com \
    --to=dmorris@metavize.com \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.