From: David Miller <davem@davemloft.net>
To: pl@dlh.net
Cc: sparclinux@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: PATCH: tcp rfc 2385 security/bugfix for sparc64
Date: Fri, 28 Sep 2007 14:20:15 -0700 (PDT) [thread overview]
Message-ID: <20070928.142015.82358847.davem@davemloft.net> (raw)
In-Reply-To: <23966.84.62.25.8.1191012145.squirrel@cs1.dlh.net>
From: "Peter Lieven" <pl@dlh.net>
Date: Fri, 28 Sep 2007 22:42:25 +0200 (CEST)
> TCP MD5 signatures on sparc64 (big-endian) completely fail on current
> kernel releases in interoperability with Cisco/Foundry or other
> little-endian linux systems.
>
> The root cause is a cast in the return statement of tcp_v4_md5_do_lookup,
> where a tcp4_md5sig_key is casted onto tcp_md5sig_key without proper
> conversion. On little-endian systems the upper 8 bits are cut of which
> yields the expected behaviour. However, on big-endian systems (like
> sparc64) only the most significant 8 bits are preserved. Since
> TCP_MD5SIG_MAXKEYLEN is 80, this always yields 0.
>
> In the calculation of the md5 signature afterwards the key is therefore
> not appended to the tcp segment which could result in a security problem
> since only the presence of a md5 signature is checked, and the key itself
> doesn't matter.
Thanks for finding this bug.
> --- linux.old/include/net/tcp.h 2007-09-28 21:43:26.000000000 +0200 +++
> linux/include/net/tcp.h 2007-09-28 21:45:35.000000000 +0200 @@ -1055,6
> +1055,7 @@ static inline void clear_all_retrans_hin
I'll have to apply this patch by hand because your email client
completely corrupted the patch.
> Signed-off-by: Peter Lieven <pl@dlh.net>
> Signed-off-by: Matthias M. Dellweg <2500@gmx.de>
Thanks again.
next prev parent reply other threads:[~2007-09-28 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-28 20:42 PATCH: tcp rfc 2385 security/bugfix for sparc64 Peter Lieven
2007-09-28 21:20 ` David Miller [this message]
2007-09-28 21:30 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2007-10-16 16:47 Matthias Dellweg
2007-10-30 3:51 ` 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=20070928.142015.82358847.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=pl@dlh.net \
--cc=sparclinux@vger.kernel.org \
--cc=torvalds@linux-foundation.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