All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: fixed kernel panic when trying to find tcp option
@ 2004-09-15 11:36 Yasuyuki Kozakai
  2004-09-15 15:43 ` David S. Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Yasuyuki Kozakai @ 2004-09-15 11:36 UTC (permalink / raw)
  To: netfilter-devel; +Cc: usagi-core

[-- Attachment #1: Type: Text/Plain, Size: 295 bytes --]

Hi,

This patch fixed panic on 2.6.9-rc2 when trying to find tcp option
in the packet which has no option.

If not fixed yet, please apply this patch.

Regards,

-----------------------------------------------------------------
Yasuyuki KOZAKAI @ USAGI Project <yasuyuki.kozakai@toshiba.co.jp>


[-- Attachment #2: tcp_find_option.patch --]
[-- Type: Text/Plain, Size: 512 bytes --]

--- linux-2.6.9-rc2/net/ipv4/netfilter/ip_tables.c	2004-09-15 14:04:16.000000000 +0900
+++ linux-2.6.9-rc2-nolinearize/net/ipv4/netfilter/ip_tables.c	2004-09-15 20:01:42.970226904 +0900
@@ -1464,8 +1464,9 @@ tcp_find_option(u_int8_t option,
 	unsigned int i;
 
 	duprintf("tcp_match: finding option\n");
+	if (!optlen)
+		return invert;
 	/* If we don't have the whole header, drop packet. */
-	BUG_ON(!optlen);
 	op = skb_header_pointer(skb,
 				skb->nh.iph->ihl*4 + sizeof(struct tcphdr),
 				optlen, _opt);

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

end of thread, other threads:[~2004-09-15 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-15 11:36 [PATCH]: fixed kernel panic when trying to find tcp option Yasuyuki Kozakai
2004-09-15 15:43 ` David S. Miller
2004-09-15 15:50   ` David S. Miller
2004-09-15 17:20     ` Yasuyuki Kozakai
2004-09-15 17:22       ` David S. Miller
2004-09-15 17:31       ` Yasuyuki Kozakai

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.