* rc4-hmac-md5 mount failure
@ 2011-03-28 20:56 Olga Kornievskaia
2011-04-04 12:12 ` Steve Dickson
2011-04-06 17:17 ` Trond Myklebust
0 siblings, 2 replies; 6+ messages in thread
From: Olga Kornievskaia @ 2011-03-28 20:56 UTC (permalink / raw)
To: linux-nfs; +Cc: Trond Myklebust
I apologize I have posted an incomplete problem/solution and possibly
to the wrong thread.
Problem: linux client mounting linux server using rc4-hmac-md5
enctype. gssd fails with create a context after receiving a reply from
the server.
Diagnose: putting printout statements in the server kernel and
kerberos libraries revealed that client and server derived different
integrity keys.
Server kernel code was at fault due the the commit
[aglo@skydive linux-pnfs]$ git show 411b5e05617593efebc06241dbc56f42150f2abe
commit 411b5e05617593efebc06241dbc56f42150f2abe
Author: Joe Perches <joe@perches.com>
Date: Mon Sep 13 12:48:01 2010 -0700
net/sunrpc: Use static const char arrays
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
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.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: rc4-hmac-md5 mount failure
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
1 sibling, 0 replies; 6+ messages in thread
From: Steve Dickson @ 2011-04-04 12:12 UTC (permalink / raw)
To: Olga Kornievskaia; +Cc: linux-nfs, Trond Myklebust
On 03/28/2011 04:56 PM, Olga Kornievskaia wrote:
> I apologize I have posted an incomplete problem/solution and possibly
> to the wrong thread.
>
> Problem: linux client mounting linux server using rc4-hmac-md5
> enctype. gssd fails with create a context after receiving a reply from
> the server.
>
> Diagnose: putting printout statements in the server kernel and
> kerberos libraries revealed that client and server derived different
> integrity keys.
>
> Server kernel code was at fault due the the commit
>
> [aglo@skydive linux-pnfs]$ git show 411b5e05617593efebc06241dbc56f42150f2abe
> commit 411b5e05617593efebc06241dbc56f42150f2abe
> Author: Joe Perches <joe@perches.com>
> Date: Mon Sep 13 12:48:01 2010 -0700
>
> net/sunrpc: Use static const char arrays
>
> Signed-off-by: Joe Perches <joe@perches.com>
> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
With https://bugzilla.redhat.com/show_bug.cgi?id=690754
I can verify that commit 411b5e0 does indeed cause
mount failure when using -o sec=krb5 and reverting this
commit does fix the problem...
steved.
>
> 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.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rc4-hmac-md5 mount failure
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
1 sibling, 1 reply; 6+ messages in thread
From: Trond Myklebust @ 2011-04-06 17:17 UTC (permalink / raw)
To: Olga Kornievskaia, Joe Perches; +Cc: linux-nfs
On Mon, 2011-03-28 at 16:56 -0400, Olga Kornievskaia wrote:
> I apologize I have posted an incomplete problem/solution and possibly
> to the wrong thread.
>
> Problem: linux client mounting linux server using rc4-hmac-md5
> enctype. gssd fails with create a context after receiving a reply from
> the server.
>
> Diagnose: putting printout statements in the server kernel and
> kerberos libraries revealed that client and server derived different
> integrity keys.
>
> Server kernel code was at fault due the the commit
>
> [aglo@skydive linux-pnfs]$ git show 411b5e05617593efebc06241dbc56f42150f2abe
> commit 411b5e05617593efebc06241dbc56f42150f2abe
> Author: Joe Perches <joe@perches.com>
> Date: Mon Sep 13 12:48:01 2010 -0700
>
> net/sunrpc: Use static const char arrays
>
> Signed-off-by: Joe Perches <joe@perches.com>
> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
>
> 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.
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rc4-hmac-md5 mount failure
2011-04-06 17:17 ` Trond Myklebust
@ 2011-04-06 17:36 ` Jim Rees
2011-04-06 19:07 ` Tom Haynes
0 siblings, 1 reply; 6+ messages in thread
From: Jim Rees @ 2011-04-06 17:36 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Olga Kornievskaia, Joe Perches, linux-nfs
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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rc4-hmac-md5 mount failure
2011-04-06 17:36 ` Jim Rees
@ 2011-04-06 19:07 ` Tom Haynes
2011-04-06 19:36 ` Jim Rees
0 siblings, 1 reply; 6+ messages in thread
From: Tom Haynes @ 2011-04-06 19:07 UTC (permalink / raw)
To: Jim Rees; +Cc: Trond Myklebust, Olga Kornievskaia, Joe Perches, linux-nfs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: rc4-hmac-md5 mount failure
2011-04-06 19:07 ` Tom Haynes
@ 2011-04-06 19:36 ` Jim Rees
0 siblings, 0 replies; 6+ messages in thread
From: Jim Rees @ 2011-04-06 19:36 UTC (permalink / raw)
To: Tom Haynes; +Cc: Trond Myklebust, Olga Kornievskaia, Joe Perches, linux-nfs
Tom Haynes wrote:
Because it is no longer on the stack?
Yes, that much is obvious. What I didn't understand was the part about
virt_to_page().
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-04-06 19:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-04-06 19:36 ` Jim Rees
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).