Skip to contentSkip to conversation

: ipt_CLUSTERIP: fix oops in checkentry function

NETFILTER -stable Patrick McHardy 3 participants 4 messages Apr 10, 2007 – Apr 11, 2007

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

Fix netfilter crash in ipt_CLUSTERIP. Please apply.

[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 */
#2 lore raw

patch netfilter-ipt_clusterip-fix-oops-in-checkentry-function.patch queued to -stable tree

In reply to Patrick McHardy

This is a note to let you know that we have just queued up the patch titled

Subject: NETFILTER: ipt_CLUSTERIP: fix oops in checkentry function

to the 2.6.20-stable tree. Its filename is

netfilter-ipt_clusterip-fix-oops-in-checkentry-function.patch

A git repo of this tree can be found at
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 1 line

From [email protected] Tue Apr 10 05:49:18 2007

From: Patrick McHardy <[email protected]>
Date: Tue, 10 Apr 2007 14:47:21 +0200
Subject: NETFILTER: ipt_CLUSTERIP: fix oops in checkentry function
To: [email protected]
Cc: Netfilter Development Mailinglist <[email protected]>, "David S. Miller" <[email protected]>
Message-ID: <[email protected]>

From: Patrick McHardy <[email protected]>

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

net/ipv4/netfilter/ipt_CLUSTERIP.c +0 -2
@@ -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 */

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Patches currently in stable-queue which might be from [email protected] are

#3 lore raw

patch netfilter-ipt_clusterip-fix-oops-in-checkentry-function.patch queued to -stable tree

In reply to Patrick McHardy

This is a note to let you know that we have just queued up the patch titled

Subject: NETFILTER: ipt_CLUSTERIP: fix oops in checkentry function

to the 2.6.20-stable tree. Its filename is

netfilter-ipt_clusterip-fix-oops-in-checkentry-function.patch

A git repo of this tree can be found at
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 1 line

From [email protected] Tue Apr 10 05:49:18 2007

From: Patrick McHardy <[email protected]>
Date: Tue, 10 Apr 2007 14:47:21 +0200
Subject: NETFILTER: ipt_CLUSTERIP: fix oops in checkentry function
To: [email protected]
Cc: Netfilter Development Mailinglist <[email protected]>, "David S. Miller" <[email protected]>
Message-ID: <[email protected]>

From: Patrick McHardy <[email protected]>

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

net/ipv4/netfilter/ipt_CLUSTERIP.c +0 -2
@@ -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 */

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Patches currently in stable-queue which might be from [email protected] are