linux/fs/nfs
Dan Carpenter 674b222292 nfs: include space for the NUL in root path
In root_nfs_name() it does the following:

        if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) {
                printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n");
                return -1;
        }
        sprintf(nfs_export_path, buf, cp);

In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN)
then the sprintf() would lead to an overflow.  Generally the rest of the
code assumes that the path can have NFS_MAXPATHLEN (1024) characters and
a NUL terminator so the fix is to add space to the nfs_export_path[]
buffer.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-07-30 15:33:39 -04:00
..
cache_lib.c
cache_lib.h
callback_proc.c
callback_xdr.c
callback.c
callback.h
client.c NFSv4.1: Ensure that we initialise the session when following a referral 2010-06-22 13:22:53 -04:00
delegation.c NFSv4: Don't use GFP_KERNEL allocations in state recovery 2010-05-14 15:09:33 -04:00
delegation.h
dir.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
direct.c
dns_resolve.c
dns_resolve.h
file.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
fscache-index.c
fscache.c NFS: Squelch compiler warning 2010-05-14 15:09:31 -04:00
fscache.h
getroot.c nfs4 use mandatory attribute file type in nfs4_get_root 2010-06-22 13:17:43 -04:00
idmap.c
inode.c NFSv4: Allow attribute caching with 'noac' mounts if client holds a delegation 2010-05-14 15:09:30 -04:00
internal.h mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
iostat.h NFS: Squelch compiler warning in nfs_add_server_stats() 2010-05-14 15:09:31 -04:00
Kconfig
Makefile
mount_clnt.c
namespace.c
nfs2xdr.c
nfs3acl.c NFS: Reduce stack footprint of nfs3_proc_getacl() and nfs3_proc_setacl() 2010-05-14 15:09:28 -04:00
nfs3proc.c NFS: Reduce the stack footprint of nfs_rmdir 2010-05-14 15:09:26 -04:00
nfs3xdr.c NFS: Reduce stack footprint of nfs_proc_remove() 2010-05-14 15:09:26 -04:00
nfs4_fs.h NFSv4: Don't use GFP_KERNEL allocations in state recovery 2010-05-14 15:09:33 -04:00
nfs4namespace.c NFSv4: Fix up the documentation for nfs_do_refmount 2010-05-14 15:09:29 -04:00
nfs4proc.c NFSv4: Don't use GFP_KERNEL allocations in state recovery 2010-05-14 15:09:33 -04:00
nfs4renewd.c
nfs4state.c NFSv4: Don't use GFP_KERNEL allocations in state recovery 2010-05-14 15:09:33 -04:00
nfs4xdr.c NFSv4: Fix an embarassing typo in encode_attrs() 2010-06-22 13:22:54 -04:00
nfsroot.c nfs: include space for the NUL in root path 2010-07-30 15:33:39 -04:00
pagelist.c NFS: Clean up nfs_create_request() 2010-05-14 15:09:34 -04:00
proc.c NFS: Reduce the stack footprint of nfs_proc_symlink() 2010-05-14 15:09:27 -04:00
read.c NFS: Read requests can use GFP_KERNEL. 2010-05-14 15:09:34 -04:00
super.c NFSv4: Ensure that /proc/self/mountinfo displays the minor version number 2010-06-22 13:22:53 -04:00
symlink.c
sysctl.c
unlink.c NFS: Reduce stack footprint of nfs_proc_remove() 2010-05-14 15:09:26 -04:00
write.c NFS: Fix another nfs_wb_page() deadlock 2010-05-26 08:43:53 -04:00