All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: David <david@unsolicited.net>,
	"Ismail Dönmez" <ismail@pardus.org.tr>,
	netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: Netfilter: kernel panic with REDIRECT target. (2.6.23 and 2.6.23.8)
Date: Tue, 20 Nov 2007 13:24:17 +0100	[thread overview]
Message-ID: <4742D1F1.20805@trash.net> (raw)
In-Reply-To: <4742CEDF.2020102@trash.net>

Patrick McHardy wrote:
> Evgeniy Polyakov wrote:
>>>>> Ok, let's try it hard way.
>>>>> Please check attached patch and tell if it helped (it will produce
>>>>> some debug though).
>>>> With both patches applied - one Patrick showed and this one.
>>>>   
>>> Now works, with this in dmesg
>>>
>>> conntrack: ea94159c, new: ead4d7c4, old: ead4d7d0, ct: 00000000.
>>
>> David (Miller :), please apply attached patch, which also needed to fix
>> netfilter connection tracking bug.
>> When connection tracking entry (nf_conn) is about to copy itself it can
>> have some of its extension users (like nat) as being already freed and
>> thus not required to be copied.
>> Frankly saying, it can be not the correct fix, but from code observation
>> and test, perfomed by David <david@unsolicited.net> it is.
> 
> I also don't believe this can be correct, let me look into this
> first.


I now understand whats happening:

- new connection is allocated without helper
- connection is REDIRECTed to localhost
- nf_nat_setup_info adds NAT extension, but doesn't initialize it yet
- nf_conntrack_alter_reply performs a helper lookup based on the
   new tuple, finds the SIP helper and allocates a helper extension,
   causing reallocation because of too little space
- nf_nat_move_storage is called with the uninitialized nat extension

So your fix is entirely correct, thanks a lot :)

  reply	other threads:[~2007-11-20 12:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-18 19:00 Netfilter: kernel panic with REDIRECT target. (2.6.23 and 2.6.23.8) David
2007-11-18 19:31 ` Ismail Dönmez
2007-11-18 19:34   ` David
2007-11-18 19:54     ` Patrick McHardy
2007-11-19 18:51       ` David
2007-11-19 19:24         ` Evgeniy Polyakov
2007-11-19 19:31           ` Evgeniy Polyakov
2007-11-19 19:59             ` David
2007-11-20 11:55               ` Evgeniy Polyakov
2007-11-20 12:09                 ` David Miller
2007-11-20 12:11                 ` Patrick McHardy
2007-11-20 12:24                   ` Patrick McHardy [this message]
2007-11-20 12:27                     ` David Miller
2007-11-20 13:22                     ` Evgeniy Polyakov

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=4742D1F1.20805@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=david@unsolicited.net \
    --cc=ismail@pardus.org.tr \
    --cc=johnpol@2ka.mipt.ru \
    --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 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.