From: Stephen Hemminger <shemminger@osdl.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: netdev@vger.kernel.org, stable@kernel.org
Subject: [PATCH] ipx: header length validation needed
Date: Mon, 7 Aug 2006 13:46:36 -0700 [thread overview]
Message-ID: <20060807134636.30f8b779@localhost.localdomain> (raw)
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);
next reply other threads:[~2006-08-07 20:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-07 20:46 Stephen Hemminger [this message]
2006-08-07 23:24 ` [PATCH] ipx: header length validation needed David Miller
2006-08-07 23:36 ` Stephen Hemminger
2006-08-08 3:10 ` David Miller
2006-08-10 6:50 ` [stable] " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060807134636.30f8b779@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=acme@ghostprotocols.net \
--cc=netdev@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).