-
- Downloads
nfsd: Fix NFSD_MAY_BYPASS_GSS and NFSD_MAY_BYPASS_GSS_ON_ROOT
Currently NFSD_MAY_BYPASS_GSS and NFSD_MAY_BYPASS_GSS_ON_ROOT do not bypass only GSS, but bypass any method. This is a problem specially for NFS3 AUTH_NULL-only exports. The purpose of NFSD_MAY_BYPASS_GSS_ON_ROOT is described in RFC 2623, section 2.3.2, to allow mounting NFS2/3 GSS-only export without authentication. So few procedures which do not expose security risk used during mount time can be called also with AUTH_NONE or AUTH_SYS, to allow client mount operation to finish successfully. The problem with current implementation is that for AUTH_NULL-only exports, the NFSD_MAY_BYPASS_GSS_ON_ROOT is active also for NFS3 AUTH_UNIX mount attempts which confuse NFS3 clients, and make them think that AUTH_UNIX is enabled and is working. Linux NFS3 client never switches from AUTH_UNIX to AUTH_NONE on active mount, which makes the mount inaccessible. Fix the NFSD_MAY_BYPASS_GSS and NFSD_MAY_BYPASS_GSS_ON_ROOT implementation and really allow to bypass only exports which have enabled some real authentication (GSS, TLS, or any other). The result would be: For AUTH_NULL-only export if client attempts to do mount with AUTH_UNIX flavor then it will receive access errors, which instruct client that AUTH_UNIX flavor is not usable and will either try other auth flavor (AUTH_NULL if enabled) or fails mount procedure. Similarly if client attempt to do mount with AUTH_NULL flavor and only AUTH_UNIX flavor is enabled then the client will receive access error. This should fix problems with AUTH_NULL-only or AUTH_UNIX-only exports if client attempts to mount it with other auth flavor (e.g. with AUTH_NULL for AUTH_UNIX-only export, or with AUTH_UNIX for AUTH_NULL-only export). Signed-off-by:Pali Rohár <pali@kernel.org> Reviewed-by:
NeilBrown <neilb@suse.de> Signed-off-by:
Chuck Lever <chuck.lever@oracle.com>
Showing
- fs/nfsd/export.c 20 additions, 1 deletionfs/nfsd/export.c
- fs/nfsd/export.h 2 additions, 1 deletionfs/nfsd/export.h
- fs/nfsd/nfs4proc.c 1 addition, 1 deletionfs/nfsd/nfs4proc.c
- fs/nfsd/nfs4xdr.c 1 addition, 1 deletionfs/nfsd/nfs4xdr.c
- fs/nfsd/nfsfh.c 6 additions, 3 deletionsfs/nfsd/nfsfh.c
- fs/nfsd/vfs.c 1 addition, 1 deletionfs/nfsd/vfs.c
Loading
Please register or sign in to comment