From: Scott Mayhew <smayhew@redhat.com>
To: trond.myklebust@primarydata.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH] auth_gss: fix panic in gss_pipe_downcall() in fips mode
Date: Mon, 15 Feb 2016 14:28:41 -0500 [thread overview]
Message-ID: <1455564521-21927-1-git-send-email-smayhew@redhat.com> (raw)
md5 is disabled in fips mode, and attempting to import a gss context
using md5 while in fips mode will result in crypto_alg_mod_lookup()
returning -ENOENT, which will make its way back up to
gss_pipe_downcall(), where the BUG() is triggered. Handling the -ENOENT
allows for a more graceful failure.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
net/sunrpc/auth_gss/auth_gss.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 799e65b..c30fc3b 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -737,6 +737,9 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
case -ENOSYS:
gss_msg->msg.errno = -EAGAIN;
break;
+ case -ENOENT:
+ gss_msg->msg.errno = -EPROTONOSUPPORT;
+ break;
default:
printk(KERN_CRIT "%s: bad return from "
"gss_fill_context: %zd\n", __func__, err);
--
2.4.3
next reply other threads:[~2016-02-15 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 19:28 Scott Mayhew [this message]
2016-02-15 19:57 ` [PATCH] auth_gss: fix panic in gss_pipe_downcall() in fips mode Trond Myklebust
2016-02-16 21:20 ` Scott Mayhew
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=1455564521-21927-1-git-send-email-smayhew@redhat.com \
--to=smayhew@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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).