From: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
To: netdev@oss.sgi.com
Cc: netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org
Subject: [PATCH]: ipv6_skip_exthdr() may refer invalid memory area
Date: Fri, 20 Feb 2004 14:33:59 +0900 (JST) [thread overview]
Message-ID: <200402200534.OAA04081@toshiba.co.jp> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 274 bytes --]
Hello,
ipv6_skip_exthdr() refer invalid memory area in the case
that packet includes Fragment Header.
please apply this patch.
Regards,
-----------------------------------------------------------------
Yasuyuki KOZAKAI @ USAGI Project <yasuyuki.kozakai@toshiba.co.jp>
[-- Attachment #2: linux-2.6.3-skip-exthdr.patch --]
[-- Type: Text/Plain, Size: 728 bytes --]
diff -Nur linux-2.6.3/net/ipv6/exthdrs.c linux-2.6.3-fixed/net/ipv6/exthdrs.c
--- linux-2.6.3/net/ipv6/exthdrs.c 2004-02-18 12:57:13.000000000 +0900
+++ linux-2.6.3-fixed/net/ipv6/exthdrs.c 2004-02-19 18:04:59.000000000 +0900
@@ -709,8 +709,16 @@
if (skb_copy_bits(skb, start, &hdr, sizeof(hdr)))
BUG();
if (nexthdr == NEXTHDR_FRAGMENT) {
- struct frag_hdr *fhdr = (struct frag_hdr *) &hdr;
- if (ntohs(fhdr->frag_off) & ~0x7)
+ unsigned short frag_off;
+ if (skb_copy_bits(skb,
+ start+offsetof(struct frag_hdr,
+ frag_off),
+ &frag_off,
+ sizeof(frag_off))) {
+ return -1;
+ }
+
+ if (ntohs(frag_off) & ~0x7)
break;
hdrlen = 8;
} else if (nexthdr == NEXTHDR_AUTH)
next reply other threads:[~2004-02-20 5:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-20 5:33 Yasuyuki Kozakai [this message]
2004-02-20 17:30 ` [PATCH]: ipv6_skip_exthdr() may refer invalid memory area David S. Miller
2004-02-26 3:48 ` Yasuyuki Kozakai
2004-02-26 20:37 ` David S. Miller
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=200402200534.OAA04081@toshiba.co.jp \
--to=yasuyuki.kozakai@toshiba.co.jp \
--cc=netdev@oss.sgi.com \
--cc=netfilter-devel@lists.netfilter.org \
--cc=usagi-core@linux-ipv6.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).