linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Haynes <tdh@excfb.com>
To: Jim Rees <rees@umich.edu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	Olga Kornievskaia <aglo@citi.umich.edu>,
	Joe Perches <joe@perches.com>,
	linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: rc4-hmac-md5 mount failure
Date: Wed, 06 Apr 2011 14:07:16 -0500	[thread overview]
Message-ID: <4D9CB9E4.1090902@excfb.com> (raw)
In-Reply-To: <20110406173631.GA8741@merit.edu>

On 4/6/11 12:36 PM, Jim Rees wrote:
> Trond Myklebust wrote:
>
>    >  diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_
>    >  index 0326446..8a4d083c 100644
>    >  --- a/net/sunrpc/auth_gss/gss_krb5_mech.c
>    >  +++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
>    >  @@ -422,7 +422,7 @@ static int
>    >   context_derive_keys_rc4(struct krb5_ctx *ctx)
>    >   {
>    >         struct crypto_hash *hmac;
>    >  -       char sigkeyconstant[] = "signaturekey";
>    >  +       static const char sigkeyconstant[] = "signaturekey";
>    >         int slen = strlen(sigkeyconstant) + 1;  /* include null terminator */
>    >         struct hash_desc desc;
>    >         struct scatterlist sg[1];
>    >
>    >  Solution: if this commit is undone, rc4-based mount works without
>    >  issues. verified with linux and windows clients.
>
>    Hi Olga,
>
>    Thanks for the report! I'll revert this commit in upstream and the
>    stable kernels.
>
> But why does this fix it?
> --

Because it is no longer on the stack?

If whatever referenced it lived longer than the call to 
context_derive_keys_rc4(),
then it would be referencing garbage.

  reply	other threads:[~2011-04-06 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 20:56 rc4-hmac-md5 mount failure Olga Kornievskaia
2011-04-04 12:12 ` Steve Dickson
2011-04-06 17:17 ` Trond Myklebust
2011-04-06 17:36   ` Jim Rees
2011-04-06 19:07     ` Tom Haynes [this message]
2011-04-06 19:36       ` Jim Rees

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=4D9CB9E4.1090902@excfb.com \
    --to=tdh@excfb.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=aglo@citi.umich.edu \
    --cc=joe@perches.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rees@umich.edu \
    /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).