linux/fs/nfsd
Jeff Layton 781c2a5a5f nfsd: when reusing an existing repcache entry, unhash it first
The DRC code will attempt to reuse an existing, expired cache entry in
preference to allocating a new one. It'll then search the cache, and if
it gets a hit it'll then free the cache entry that it was going to
reuse.

The cache code doesn't unhash the entry that it's going to reuse
however, so it's possible for it end up designating an entry for reuse
and then subsequently freeing the same entry after it finds it.  This
leads it to a later use-after-free situation and usually some list
corruption warnings or an oops.

Fix this by simply unhashing the entry that we intend to reuse. That
will mean that it's not findable via a search and should prevent this
situation from occurring.

Cc: stable@vger.kernel.org # v3.10+
Reported-by: Christoph Hellwig <hch@infradead.org>
Reported-by: g. artim <gartim@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2013-12-10 20:34:44 -05:00
..
acl.h
auth.c
auth.h
cache.h
current_stateid.h
export.c nfsd: -EINVAL on invalid anonuid/gid instead of silent failure 2013-10-29 17:46:14 -04:00
fault_inject.c
idmap.h
Kconfig nfsd: fix Kconfig syntax 2013-10-26 15:37:26 -04:00
lockd.c
Makefile
netns.h nfsd4: make del_recall_lru per-network-namespace 2013-04-04 13:25:16 -04:00
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c
nfs4acl.c
nfs4callback.c nfsd4: check backchannel attributes on create_session 2013-04-09 16:53:56 -04:00
nfs4idmap.c
nfs4proc.c nfsd: Fix SP4_MACH_CRED negotiation in EXCHANGE_ID 2013-08-07 12:06:07 -04:00
nfs4recover.c nfsd: switch to %p[dD] 2013-10-24 23:34:51 -04:00
nfs4state.c Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux 2013-11-16 12:04:02 -08:00
nfs4xdr.c nfsd4: fix xdr decoding of large non-write compounds 2013-11-19 18:06:54 -05:00
nfscache.c nfsd: when reusing an existing repcache entry, unhash it first 2013-12-10 20:34:44 -05:00
nfsctl.c Merge branch 'for-3.10' of git://linux-nfs.org/~bfields/linux 2013-05-03 10:59:39 -07:00
nfsd.h nfsd4: fix minorversion support interface 2013-07-12 16:48:52 -04:00
nfsfh.c nfsd: fh_update should error out in unexpected cases 2013-10-29 17:43:52 -04:00
nfsfh.h nfsd: switch to %p[dD] 2013-10-24 23:34:51 -04:00
nfsproc.c
nfssvc.c nfsd4: fix minorversion support interface 2013-07-12 16:48:52 -04:00
nfsxdr.c
state.h nfsd4: implement minimal SP4_MACH_CRED 2013-07-01 17:23:06 -04:00
stats.c
vfs.c nfsd: make sure to balance get/put_write_access 2013-11-18 12:06:48 -05:00
vfs.h NFSD: Server implementation of MAC Labeling 2013-05-15 09:27:02 -04:00
xdr3.h
xdr4.h NFSD: Server implementation of MAC Labeling 2013-05-15 09:27:02 -04:00
xdr4cb.h nfsd4: check backchannel attributes on create_session 2013-04-09 16:53:56 -04:00
xdr.h