All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipchains bugs in 2.2/2.4/2.5 related to netlink calls
@ 2002-05-24 17:43 Alexander Atanasov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Atanasov @ 2002-05-24 17:43 UTC (permalink / raw)
  To: rusty, kuznet; +Cc: netfilter, netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 411 bytes --]

	Hi there!

oom-loop fixes error handling after a netlink failure - it does not do a
cleanup and it makes every next call to ip_fw_check to detect a
loop and drop the packet.

nlma fixes a call to netlink_broadcast with GFP_KERNEL ( passed to
skb_clone ) while we are in_interrupt() ( catched by a BUG() in
slab.c:1109 ).


2.4 patches apply to 2.5 too , tested on 2.5.15.

-- 
Best Regards,
Alexander Atanasov

[-- Attachment #2: Type: TEXT/PLAIN, Size: 315 bytes --]

--- net/ipv4/netfilter/ipchains_core.c.orig	Fri May 24 19:27:01 2002
+++ net/ipv4/netfilter/ipchains_core.c	Fri May 24 19:31:24 2002
@@ -723,6 +723,7 @@
 						      src_port, dst_port,
 						      count, tcpsyn)) {
 					ret = FW_BLOCK;
+					cleanup(chain, 0, slot);
 					goto out;
 				}
 				break;

[-- Attachment #3: Type: TEXT/PLAIN, Size: 448 bytes --]

--- net/ipv4/netfilter/ipchains_core.c.orig	Fri May 24 19:27:01 2002
+++ net/ipv4/netfilter/ipchains_core.c	Fri May 24 19:27:34 2002
@@ -549,7 +549,7 @@
 			strcpy(outskb->data+sizeof(__u32)*2, rif);
 			memcpy(outskb->data+sizeof(__u32)*2+IFNAMSIZ, ip,
 			       len-(sizeof(__u32)*2+IFNAMSIZ));
-			netlink_broadcast(ipfwsk, outskb, 0, ~0, GFP_KERNEL);
+			netlink_broadcast(ipfwsk, outskb, 0, ~0, GFP_ATOMIC);
 		}
 		else {
 #endif

[-- Attachment #4: Type: TEXT/PLAIN, Size: 279 bytes --]

--- net/ipv4/ip_fw.c.orig	Fri May 24 19:33:52 2002
+++ net/ipv4/ip_fw.c	Fri May 24 19:34:18 2002
@@ -747,6 +747,7 @@
 						      src_port, dst_port,
 						      count, tcpsyn)) {
 					ret = FW_BLOCK;
+					cleanup(chain, 0, slot);
 					goto out;
 				}
 				break;

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

* [PATCH] ipchains bugs in 2.2/2.4/2.5 related to netlink calls
@ 2002-05-24 17:43 Alexander Atanasov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Atanasov @ 2002-05-24 17:43 UTC (permalink / raw)
  To: rusty, kuznet; +Cc: netfilter, netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 411 bytes --]

	Hi there!

oom-loop fixes error handling after a netlink failure - it does not do a
cleanup and it makes every next call to ip_fw_check to detect a
loop and drop the packet.

nlma fixes a call to netlink_broadcast with GFP_KERNEL ( passed to
skb_clone ) while we are in_interrupt() ( catched by a BUG() in
slab.c:1109 ).


2.4 patches apply to 2.5 too , tested on 2.5.15.

-- 
Best Regards,
Alexander Atanasov

[-- Attachment #2: Type: TEXT/PLAIN, Size: 315 bytes --]

--- net/ipv4/netfilter/ipchains_core.c.orig	Fri May 24 19:27:01 2002
+++ net/ipv4/netfilter/ipchains_core.c	Fri May 24 19:31:24 2002
@@ -723,6 +723,7 @@
 						      src_port, dst_port,
 						      count, tcpsyn)) {
 					ret = FW_BLOCK;
+					cleanup(chain, 0, slot);
 					goto out;
 				}
 				break;

[-- Attachment #3: Type: TEXT/PLAIN, Size: 448 bytes --]

--- net/ipv4/netfilter/ipchains_core.c.orig	Fri May 24 19:27:01 2002
+++ net/ipv4/netfilter/ipchains_core.c	Fri May 24 19:27:34 2002
@@ -549,7 +549,7 @@
 			strcpy(outskb->data+sizeof(__u32)*2, rif);
 			memcpy(outskb->data+sizeof(__u32)*2+IFNAMSIZ, ip,
 			       len-(sizeof(__u32)*2+IFNAMSIZ));
-			netlink_broadcast(ipfwsk, outskb, 0, ~0, GFP_KERNEL);
+			netlink_broadcast(ipfwsk, outskb, 0, ~0, GFP_ATOMIC);
 		}
 		else {
 #endif

[-- Attachment #4: Type: TEXT/PLAIN, Size: 279 bytes --]

--- net/ipv4/ip_fw.c.orig	Fri May 24 19:33:52 2002
+++ net/ipv4/ip_fw.c	Fri May 24 19:34:18 2002
@@ -747,6 +747,7 @@
 						      src_port, dst_port,
 						      count, tcpsyn)) {
 					ret = FW_BLOCK;
+					cleanup(chain, 0, slot);
 					goto out;
 				}
 				break;

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

end of thread, other threads:[~2002-05-24 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-24 17:43 [PATCH] ipchains bugs in 2.2/2.4/2.5 related to netlink calls Alexander Atanasov
  -- strict thread matches above, loose matches on Subject: below --
2002-05-24 17:43 Alexander Atanasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.