Skip to contentSkip to conversation

: ipt_CLUSTERIP: fix oops in checkentry function

NETFILTER 2.6.21 Applied Patrick McHardy 2 participants 2 messages Apr 10, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Fix crash in CLUSTERIP target. I'll push this one to -stable as well.

[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.

---
commit 587ef6fd51ede13f0b3437910d5ecefb980461ed
tree df06064ff57ee2ddcd4b47d8a7450c7f797fa230
parent fea42a5760325392653d556b1087f8274adcfb2e
author Jaroslav Kysela <[email protected]> Tue, 10 Apr 2007 14:42:29 +0200 committer Patrick McHardy <[email protected]> Tue, 10 Apr 2007 14:42:29 +0200

 net/ipv4/netfilter/ipt_CLUSTERIP.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
net/ipv4/netfilter/ipt_CLUSTERIP.c +0 -2
index e965b33..42b0802 100644
@@ -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 */
maintainer Applied
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Tue, 10 Apr 2007 14:45:32 +0200

Quoted 1 line

Fix crash in CLUSTERIP target. I'll push this one to -stable as well.

Applied, thanks Patrick.