From: Thomas Graf <tgraf@suug.ch>
To: davem@redhat.com, jmorris@intercode.com.au, yoshfuji@linux-ipv6.org
Cc: netdev@oss.sgi.com, tgraf@suug.ch
Subject: [PATCH] IPV6: fix data offset calculation when pushing frag options {dst1opts|auth}
Date: Fri, 11 Jul 2003 01:44:49 +0200 [thread overview]
Message-ID: <20030710234449.GB30577@rei.rakuen> (raw)
Hello
ip6_append_data:
The offset in the datagram where the payload gets copied
to (transhdrlen) is not calculated correctly: the size
of frag opts {dst1opt|auth} is not taken into account.
This lead to overwritten payload by frag opts.
yoshfuji agreed on this.
patch is against 2.5.75
-- thomas
Index: net/ipv6/ip6_output.c
===================================================================
RCS file: /cvs/tgr/linux-25/net/ipv6/ip6_output.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 ip6_output.c
--- net/ipv6/ip6_output.c 10 Jul 2003 22:58:50 -0000 1.1.1.2
+++ net/ipv6/ip6_output.c 10 Jul 2003 23:36:48 -0000
@@ -1247,11 +1247,9 @@
inet->cork.length = 0;
inet->sndmsg_page = NULL;
inet->sndmsg_off = 0;
- if ((exthdrlen = rt->u.dst.header_len) != 0) {
- length += exthdrlen;
- transhdrlen += exthdrlen;
- }
- exthdrlen += opt ? opt->opt_flen : 0;
+ exthdrlen = rt->u.dst.header_len + opt ? opt->opt_flen : 0;
+ length += exthdrlen;
+ transhdrlen += exthdrlen;
} else {
rt = np->cork.rt;
if (inet->cork.flags & IPCORK_OPT)
next reply other threads:[~2003-07-10 23:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-10 23:44 Thomas Graf [this message]
2003-07-11 0:18 ` [PATCH] IPV6: fix data offset calculation when pushing frag options {dst1opts|auth} YOSHIFUJI Hideaki / 吉藤英明
2003-07-11 0:24 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-11 0:18 ` David S. Miller
2003-07-11 0:27 ` Thomas Graf
2003-07-11 0:22 ` David S. Miller
2003-07-11 0:32 ` Thomas Graf
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=20030710234449.GB30577@rei.rakuen \
--to=tgraf@suug.ch \
--cc=davem@redhat.com \
--cc=jmorris@intercode.com.au \
--cc=netdev@oss.sgi.com \
--cc=yoshfuji@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