From: Florian Westphal <fw@strlen.de>
To: netdev@vger.kernel.org
Cc: jbohac@suse.cz, Florian Westphal <fw@strlen.de>
Subject: [PATCH 2/2] tcp: syncookies: reduce mss table to four values
Date: Sun, 25 Aug 2013 19:54:02 +0200 [thread overview]
Message-ID: <1377453242-4773-2-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1377453242-4773-1-git-send-email-fw@strlen.de>
Halve mss table size to make blind cookie guessing more difficult.
This is sad since the tables were already small, but there
is little alternative except perhaps adding more precise mss information
in the tcp timestamp. Timestamps are unfortunately not ubiquitous.
Guessing all possible cookie values still has 8-in 2**32 chance.
Reported-by: Jakob Lell <jakob@jakoblell.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
Another argument AGAINST this patch is that if 16-in 2**32 is
too easy then 8-in-2**32 will be doable, too.
net/ipv4/syncookies.c | 6 +-----
net/ipv6/syncookies.c | 4 ----
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index e2f84eb..fd52401 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -143,14 +143,10 @@ static __u32 check_tcp_syn_cookie(__u32 cookie, __be32 saddr, __be32 daddr,
* Table must be sorted.
*/
static __u16 const msstab[] = {
- 64,
- 512,
536,
- 1024,
+ 1200,
1440,
1460,
- 4312,
- 8960,
};
/*
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 6a6d585..cc4513b 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -27,13 +27,9 @@
/* Table must be sorted. */
static __u16 const msstab[] = {
- 64,
- 512,
- 536,
1280 - 60,
1480 - 60,
1500 - 60,
- 4460 - 60,
9000 - 60,
};
--
1.8.1.5
next prev parent reply other threads:[~2013-08-25 17:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-25 17:54 [PATCH 1/2] tcp: syncookies: reduce cookie lifetime to 128 seconds Florian Westphal
2013-08-25 17:54 ` Florian Westphal [this message]
2013-08-28 22:22 ` [PATCH 2/2] tcp: syncookies: reduce mss table to four values David Miller
2013-08-28 22:20 ` [PATCH 1/2] tcp: syncookies: reduce cookie lifetime to 128 seconds David Miller
-- strict thread matches above, loose matches on Subject: below --
2013-09-01 19:55 [PATCH v2 -next " Florian Westphal
2013-09-01 19:55 ` [PATCH 2/2] tcp: syncookies: reduce mss table to four values Florian Westphal
2013-09-04 2:32 ` 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=1377453242-4773-2-git-send-email-fw@strlen.de \
--to=fw@strlen.de \
--cc=jbohac@suse.cz \
--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).