Patchwork netfilter: avoid double free in nf_reinject

login
register
mail settings
Submitter Julian Anastasov
Date Aug. 5, 2011, 10:36 a.m.
Message ID <alpine.LFD.2.00.1108051326300.1494@ja.ssi.bg>
Download mbox | patch
Permalink /patch/108633/
State Accepted
Delegated to: David Miller
Headers show

Comments

Julian Anastasov - Aug. 5, 2011, 10:36 a.m.
NF_STOLEN means skb was already freed

Signed-off-by: Julian Anastasov <ja@ssi.bg>
---

	May be fixes IPVS+ip_queue problem reported by Kumar Swamy:

	http://marc.info/?l=linux-virtual-server&m=131098073717449&w=2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Aug. 8, 2011, 5:11 a.m.
From: Julian Anastasov <ja@ssi.bg>
Date: Fri, 5 Aug 2011 13:36:28 +0300 (EEST)

> 
> 	NF_STOLEN means skb was already freed
> 
> Signed-off-by: Julian Anastasov <ja@ssi.bg>
> ---
> 
> 	May be fixes IPVS+ip_queue problem reported by Kumar Swamy:
> 
> 	http://marc.info/?l=linux-virtual-server&m=131098073717449&w=2

Since the netfilter maintainers are taking too damn long to integrate
bug fixes (and this has been happening for months), I'm going to apply
this directly.

Thanks Julian.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Engelhardt - Aug. 8, 2011, 10:13 a.m.
On Monday 2011-08-08 07:11, David Miller wrote:

>From: Julian Anastasov <ja@ssi.bg>
>Date: Fri, 5 Aug 2011 13:36:28 +0300 (EEST)
>
>> 
>> 	NF_STOLEN means skb was already freed
>> 
>> Signed-off-by: Julian Anastasov <ja@ssi.bg>
>> ---
>> 
>> 	May be fixes IPVS+ip_queue problem reported by Kumar Swamy:
>> 
>> 	http://marc.info/?l=linux-virtual-server&m=131098073717449&w=2
>
>Since the netfilter maintainers are taking too damn long to integrate
>bug fixes (and this has been happening for months), I'm going to apply
>this directly.

I am offering myself as a candidate for a substitute.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -urp v3.0/linux/net/netfilter/nf_queue.c linux/net/netfilter/nf_queue.c
--- v3.0/linux/net/netfilter/nf_queue.c	2011-05-20 10:38:08.000000000 +0300
+++ linux/net/netfilter/nf_queue.c	2011-08-05 13:18:29.755962759 +0300
@@ -312,6 +312,7 @@  void nf_reinject(struct nf_queue_entry *
 		}
 		break;
 	case NF_STOLEN:
+		break;
 	default:
 		kfree_skb(skb);
 	}