Skip to contentSkip to conversation

: H.323 conntrack: fix crash with CONFIG_IP_NF_CT_ACCT

NETFILTER Patrick McHardy 1 participant 1 message Nov 17, 2006

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

The following patch fixes a crash in ip_ct_refresh_acct() with the H.323 helper caused by a NULL-ptr dereference. The patch applies cleanly to current git and -stable.

Please apply, thanks.

[NETFILTER]: H.323 conntrack: fix crash with CONFIG_IP_NF_CT_ACCT

H.323 connection tracking code calls ip_ct_refresh_acct() when processing RCFs and URQs but passes NULL as the skb.
When CONFIG_IP_NF_CT_ACCT is enabled, the connection tracking core tries to derefence the skb, which results in an obvious panic.
A similar fix was applied on the SIP connection tracking code some time ago.

---
commit 76b0c2b63fd5a2da358b36a22b7bf99298dde0b7
tree cd96ddb4c4cd5ffb44ed5a47fa3be41267eea99a
parent 1b9bb3c14c60324b54645ffefbe6d270f9fd191c
author Faidon Liambotis <[email protected]> Fri, 17 Nov 2006 21:01:25 +0100 committer Patrick McHardy <[email protected]> Fri, 17 Nov 2006 21:01:25 +0100

 net/ipv4/netfilter/ip_conntrack_helper_h323.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/netfilter/ip_conntrack_helper_h323.c +2 -2
index 7b74412..aeb60dc 100644
@@ -1417,7 +1417,7 @@ static int process_rcf(struct sk_buff **
 		DEBUGP
 		    ("ip_ct_ras: set RAS connection timeout to %u seconds\n",
 		     info->timeout);
-		ip_ct_refresh_acct(ct, ctinfo, NULL, info->timeout * HZ);
+		ip_ct_refresh(ct, *pskb, info->timeout * HZ);
 
 		/* Set expect timeout */
 		read_lock_bh(&ip_conntrack_lock);
@@ -1465,7 +1465,7 @@ static int process_urq(struct sk_buff **
 	info->sig_port[!dir] = 0;
 
 	/* Give it 30 seconds for UCF or URJ */
-	ip_ct_refresh_acct(ct, ctinfo, NULL, 30 * HZ);
+	ip_ct_refresh(ct, *pskb, 30 * HZ);
 
 	return 0;
 }