All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "nfsd: fix deadlock secinfo+readdir compound" has been added to the 4.5-stable tree
@ 2016-04-10 18:01 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-10 18:01 UTC (permalink / raw)
  To: bfields, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    nfsd: fix deadlock secinfo+readdir compound

to the 4.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfsd-fix-deadlock-secinfo-readdir-compound.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 2f6fc056e899bd0144a08da5cacaecbe8997cd74 Mon Sep 17 00:00:00 2001
From: "J. Bruce Fields" <bfields@redhat.com>
Date: Wed, 2 Mar 2016 16:36:21 -0800
Subject: nfsd: fix deadlock secinfo+readdir compound

From: J. Bruce Fields <bfields@redhat.com>

commit 2f6fc056e899bd0144a08da5cacaecbe8997cd74 upstream.

nfsd_lookup_dentry exits with the parent filehandle locked.  fh_put also
unlocks if necessary (nfsd filehandle locking is probably too lenient),
so it gets unlocked eventually, but if the following op in the compound
needs to lock it again, we can deadlock.

A fuzzer ran into this; normal clients don't send a secinfo followed by
a readdir in the same compound.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfsd/nfs4proc.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -878,6 +878,7 @@ nfsd4_secinfo(struct svc_rqst *rqstp, st
 				    &exp, &dentry);
 	if (err)
 		return err;
+	fh_unlock(&cstate->current_fh);
 	if (d_really_is_negative(dentry)) {
 		exp_put(exp);
 		err = nfserr_noent;


Patches currently in stable-queue which might be from bfields@redhat.com are

queue-4.5/nfsd-fix-deadlock-secinfo-readdir-compound.patch
queue-4.5/nfsd4-fix-bad-bounds-checking.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-10 18:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-10 18:01 Patch "nfsd: fix deadlock secinfo+readdir compound" has been added to the 4.5-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.