All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipx: header length validation needed
@ 2006-08-07 20:46 Stephen Hemminger
  2006-08-07 23:24 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2006-08-07 20:46 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: netdev, stable

IPX is not checking for non-linear (and short packets) in it's receive routine.
This is serious because it may mean it ends up reading past end of skb.

This maybe related to this bug, because sky2 will copy small packets into small
skb's.

    http://bugzilla.kernel.org/show_bug.cgi?id=6693

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>


--- a/net/ipx/af_ipx.c	2006-07-07 13:02:31.000000000 -0700
+++ b/net/ipx/af_ipx.c	2006-08-07 13:18:08.000000000 -0700
@@ -1642,6 +1642,9 @@
 	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
 		goto out;
 
+	if (!pskb_may_pull(skb, sizeof(struct ipxhdr)))
+		goto drop;
+
 	ipx		= ipx_hdr(skb);
 	ipx_pktsize	= ntohs(ipx->ipx_pktsize);
 	

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

end of thread, other threads:[~2006-08-10  6:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-07 20:46 [PATCH] ipx: header length validation needed Stephen Hemminger
2006-08-07 23:24 ` David Miller
2006-08-07 23:36   ` Stephen Hemminger
2006-08-08  3:10     ` David Miller
2006-08-10  6:50     ` [stable] " Greg KH

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.