netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [netfilter-core] [PATCH 2.6.19-rc6] netfilter: fix panic on ip_conntrack_h323 with CONFIG_IP_NF_CT_ACCT
  2006-11-16 10:47 Faidon Liambotis
@ 2006-11-16 11:30 ` Patrick McHardy
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2006-11-16 11:30 UTC (permalink / raw)
  To: Faidon Liambotis; +Cc: coreteam, netdev, linux-kernel, stable

Faidon Liambotis wrote:
> 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.

Good catch, but the fix is wrong and will lead to double accounting
of the skb. The correct fix is to use ip_ct_refresh() instead,
which only updates the timeout. Can you send a new patch please?

> Signed-off-by: Faidon Liambotis <paravoid@debian.org>
> 
> --- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c	2006-11-15 19:07:50.000000000 +0200
> +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c	2006-11-16 11:09:46.000000000 +0200
> @@ -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_acct(ct, ctinfo, *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_acct(ct, ctinfo, *pskb, 30 * HZ);
>  
>  	return 0;
>  }
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2.6.19-rc6] netfilter: fix panic on ip_conntrack_h323 with CONFIG_IP_NF_CT_ACCT
@ 2006-11-20 19:39 Faidon Liambotis
  2006-11-22  5:51 ` [netfilter-core] " Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Faidon Liambotis @ 2006-11-20 19:39 UTC (permalink / raw)
  To: coreteam; +Cc: netdev, linux-kernel, stable

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

The patch uses ip_ct_refresh() instead of ip_ct_refresh_acct() to avoid
double accounting (suggested by Patrick McHardy).

Signed-off-by: Faidon Liambotis <paravoid@debian.org>

--- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c	2006-11-15 19:07:50.000000000 +0200
+++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c	2006-11-16 11:09:46.000000000 +0200
@@ -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;
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [netfilter-core] [PATCH 2.6.19-rc6] netfilter: fix panic on ip_conntrack_h323 with CONFIG_IP_NF_CT_ACCT
  2006-11-20 19:39 [PATCH 2.6.19-rc6] netfilter: fix panic on ip_conntrack_h323 with CONFIG_IP_NF_CT_ACCT Faidon Liambotis
@ 2006-11-22  5:51 ` Patrick McHardy
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2006-11-22  5:51 UTC (permalink / raw)
  To: Faidon Liambotis; +Cc: coreteam, netdev, linux-kernel, stable

Faidon Liambotis wrote:
> 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.
> ago.
> 
> The patch uses ip_ct_refresh() instead of ip_ct_refresh_acct() to avoid
> double accounting (suggested by Patrick McHardy).


Thanks, I already fixed up your first patch and sent it
upstream/to -stable after loosing hope to hear back from
you :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-22  5:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-20 19:39 [PATCH 2.6.19-rc6] netfilter: fix panic on ip_conntrack_h323 with CONFIG_IP_NF_CT_ACCT Faidon Liambotis
2006-11-22  5:51 ` [netfilter-core] " Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2006-11-16 10:47 Faidon Liambotis
2006-11-16 11:30 ` [netfilter-core] " Patrick McHardy

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