From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: [NETFILTER 2.6.21]: ipt_CLUSTERIP: fix oops in checkentry function Date: Tue, 10 Apr 2007 14:45:32 +0200 Message-ID: <461B86EC.7020707@trash.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060300060101080207070707" Cc: Netfilter Development Mailinglist To: "David S. Miller" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org This is a multi-part message in MIME format. --------------060300060101080207070707 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Fix crash in CLUSTERIP target. I'll push this one to -stable as well. --------------060300060101080207070707 Content-Type: text/plain; name="x" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x" [NETFILTER]: ipt_CLUSTERIP: fix oops in checkentry function The clusterip_config_find_get() already increases entries reference counter, so there is no reason to do it twice in checkentry() callback. This causes the config to be freed before it is removed from the list, resulting in a crash when adding the next rule. Signed-off-by: Jaroslav Kysela Signed-off-by: Patrick McHardy --- commit 587ef6fd51ede13f0b3437910d5ecefb980461ed tree df06064ff57ee2ddcd4b47d8a7450c7f797fa230 parent fea42a5760325392653d556b1087f8274adcfb2e author Jaroslav Kysela Tue, 10 Apr 2007 14:42:29 +0200 committer Patrick McHardy Tue, 10 Apr 2007 14:42:29 +0200 net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index e965b33..42b0802 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -411,12 +411,10 @@ checkentry(const char *tablename, "has invalid config pointer!\n"); return 0; } - clusterip_config_entry_get(cipinfo->config); } else { /* Case B: This is a new rule referring to an existing * clusterip config. */ cipinfo->config = config; - clusterip_config_entry_get(cipinfo->config); } } else { /* Case C: This is a completely new clusterip config */ --------------060300060101080207070707--