From: Thomas Graf <tgraf@suug.ch>
To: davem@davemloft.net, herbert@gondor.apana.org.au
Cc: netdev@vger.kernel.org
Subject: [IPv6] ESP: Discard dummy packets introduced in rfc4303
Date: Mon, 10 Dec 2007 23:18:07 +0100 [thread overview]
Message-ID: <20071210221807.GH11220@postel.suug.ch> (raw)
RFC4303 introduces dummy packets with a nexthdr value of 59
to implement traffic confidentiality. Such packets need to
be dropped silently and the payload may not be attempted to
be parsed as it consists of random chunk.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Index: net-2.6.25/net/ipv6/esp6.c
===================================================================
--- net-2.6.25.orig/net/ipv6/esp6.c 2007-12-10 16:06:02.000000000 +0100
+++ net-2.6.25/net/ipv6/esp6.c 2007-12-10 16:08:02.000000000 +0100
@@ -238,6 +238,12 @@
}
/* ... check padding bits here. Silly. :-) */
+ /* RFC4303: Drop dummy packets without any error */
+ if (nexthdr[1] == IPPROTO_NONE) {
+ ret = -EINVAL;
+ goto out;
+ }
+
pskb_trim(skb, skb->len - alen - padlen - 2);
ret = nexthdr[1];
}
next reply other threads:[~2007-12-10 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-10 22:18 Thomas Graf [this message]
2007-12-11 0:54 ` [IPv6] ESP: Discard dummy packets introduced in rfc4303 David 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=20071210221807.GH11220@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.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).