netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kaber@trash.net
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [NETFILTER 02/03]: ip_tables: fix compat related crash
Date: Tue, 05 Jun 2007 12:56:21 -0700 (PDT)	[thread overview]
Message-ID: <20070605.125621.09952042.davem@davemloft.net> (raw)
In-Reply-To: <20070605133511.10309.33387.sendpatchset@localhost.localdomain>

From: Patrick McHardy <kaber@trash.net>
Date: Tue,  5 Jun 2007 15:35:11 +0200 (MEST)

> [NETFILTER]: ip_tables: fix compat related crash
> 
> check_compat_entry_size_and_hooks iterates over the matches and calls
> compat_check_calc_match, which loads the match and calculates the
> compat offsets, but unlike the non-compat version, doesn't call
> ->checkentry yet. On error however it calls cleanup_matches, which in
> turn calls ->destroy, which can result in crashes if the destroy
> function (validly) expects to only get called after the checkentry
> function.
> 
> Add a compat_release_match function that only drops the module reference
> on error and rename compat_check_calc_match to compat_find_calc_match to
> reflect the fact that it doesn't call the checkentry function.
> 
> Reported by Jan Engelhardt <jengelh@linux01.gwdg.de>
> 
> Signed-off-by: Dmitry Mishin <dim@openvz.org>
> Signed-off-by: Patrick McHardy <kaber@trash.net>

Applied.

  reply	other threads:[~2007-06-05 19:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 13:35 [NETFILTER 00/03]: Netfilter fixes Patrick McHardy
2007-06-05 13:35 ` [NETFILTER 01/03]: nf_conntrack: fix helper module unload races Patrick McHardy
2007-06-05 19:55   ` David Miller
2007-06-09 10:41   ` Yasuyuki KOZAKAI
     [not found]   ` <200706091041.l59AfVck028409@toshiba.co.jp>
2007-06-18 12:29     ` Patrick McHardy
2007-06-20 10:57       ` [NETFILTER]: nfctnetlink: Don't allow to change helper (Was: Re: [NETFILTER 01/03]: nf_conntrack: fix helper module unload races) Yasuyuki KOZAKAI
2007-06-05 13:35 ` [NETFILTER 02/03]: ip_tables: fix compat related crash Patrick McHardy
2007-06-05 19:56   ` David Miller [this message]
2007-06-05 13:35 ` [NETFILTER 03/03]: nf_conntrack_amanda: fix textsearch_prepare() error check Patrick McHardy
2007-06-05 19:57   ` 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=20070605.125621.09952042.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kaber@trash.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).