linux-stable/fs/nfs
Hawkins Jiawei 46819f6045 nfs: fix possible null-ptr-deref when parsing param
[ Upstream commit 5559405df6 ]

According to commit "vfs: parse: deal with zero length string value",
kernel will set the param->string to null pointer in vfs_parse_fs_string()
if fs string has zero length.

Yet the problem is that, nfs_fs_context_parse_param() will dereferences the
param->string, without checking whether it is a null pointer, which may
trigger a null-ptr-deref bug.

This patch solves it by adding sanity check on param->string
in nfs_fs_context_parse_param().

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:46 +01:00
..
blocklayout NFS client updates for Linux 5.20 2022-08-10 14:04:32 -07:00
filelayout pNFS/files: Handle RDMA connection errors correctly 2022-07-10 19:00:53 -04:00
flexfilelayout NFS: Allow setting rsize / wsize to a multiple of PAGE_SIZE 2022-07-12 10:53:10 -04:00
Kconfig NFS: Replace readdir's use of xxhash() with hash_64() 2022-04-07 16:19:47 -04:00
Makefile nfs: Convert to new fscache volume/cookie API 2022-01-10 11:53:25 +00:00
cache_lib.c
cache_lib.h
callback.c NFSD: Move svc_serv_ops::svo_function into struct svc_serv 2022-02-28 10:26:40 -05:00
callback.h
callback_proc.c pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-06-06 11:53:55 -04:00
callback_xdr.c NFS: remove unneeded check in decode_devicenotify_args() 2022-03-13 12:59:34 -04:00
client.c NFS: Allow setting rsize / wsize to a multiple of PAGE_SIZE 2022-07-12 10:53:10 -04:00
delegation.c NFSv4: Fix a potential state reclaim deadlock 2022-11-10 18:17:15 +01:00
delegation.h
dir.c NFS: unlink/rmdir shouldn't call d_delete() twice on ENOENT 2022-08-19 20:31:36 -04:00
direct.c NFS client updates for Linux 5.20 2022-08-10 14:04:32 -07:00
dns_resolve.c
dns_resolve.h
export.c nfs: block notification on fs with its own ->lock 2022-01-08 14:42:01 -05:00
file.c NFS client bugfixes for Linux 6.0 2022-08-22 11:40:01 -07:00
fs_context.c nfs: fix possible null-ptr-deref when parsing param 2022-12-31 13:26:46 +01:00
fscache.c NFS: Pass i_size to fscache_unuse_cookie() when a file is released 2022-05-17 15:39:45 -04:00
fscache.h nfs: Convert to release_folio 2022-05-09 23:12:33 -04:00
getroot.c
inode.c NFS: Fix another fsync() issue after a server reboot 2022-08-13 13:02:13 -04:00
internal.h NFS: Allow very small rsize & wsize again 2022-12-31 13:26:09 +01:00
io.c
iostat.h
mount_clnt.c
namespace.c NFS: Fix an Oops in nfs_d_automount() 2022-12-31 13:26:05 +01:00
netns.h
nfs.h
nfs2super.c
nfs2xdr.c NFS: Optimise away the previous cookie field 2022-03-02 08:43:39 -05:00
nfs3_fs.h
nfs3acl.c
nfs3client.c Revert "pNFS: nfs3_set_ds_client should set NFS_CS_NOPING" 2022-07-10 19:00:53 -04:00
nfs3proc.c
nfs3super.c
nfs3xdr.c NFS: Optimise away the previous cookie field 2022-03-02 08:43:39 -05:00
nfs4_fs.h NFSv4: keep state manager thread active if swap is enabled 2022-03-13 12:59:35 -04:00
nfs4client.c nfs4: Fix kmemleak when allocate slot failed 2022-11-10 18:17:16 +01:00
nfs4file.c NFSv4.2 fix problems with __nfs42_ssc_open 2022-08-19 20:31:57 -04:00
nfs4getroot.c
nfs4idmap.c NFSv4: Fix races in the legacy idmapper upcall 2022-07-13 17:46:52 -04:00
nfs4idmap.h
nfs4namespace.c NFSv4: Fix free of uninitialized nfs4_label on referral lookup. 2022-05-31 17:09:24 -04:00
nfs4proc.c NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn 2022-12-31 13:26:04 +01:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFSv4.x: Fail client initialisation if state manager thread can't run 2022-12-31 13:26:09 +01:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h
nfs4xdr.c NFSv4.2: Fix a memory stomp in decode_attr_security_label 2022-12-31 13:26:04 +01:00
nfs42.h
nfs42proc.c NFSv4.2: Fixup CLONE dest file size for zero-length count 2022-11-10 18:17:16 +01:00
nfs42xattr.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
nfs42xdr.c NFSv4.2: Set the correct size scratch buffer for decoding READ_PLUS 2022-12-31 13:26:09 +01:00
nfsroot.c
nfstrace.c
nfstrace.h NFS: Improve readpage/writepage tracing 2022-08-09 14:11:34 -04:00
pagelist.c NFSv4.1 mark qualified async operations as MOVEABLE tasks 2022-05-31 17:09:30 -04:00
pnfs.c NFS: Remove a bogus flag setting in pnfs_write_done_resend_to_mds 2022-08-13 13:02:14 -04:00
pnfs.h pNFS: Avoid a live lock condition in pnfs_update_layout() 2022-06-06 11:53:55 -04:00
pnfs_dev.c
pnfs_nfs.c NFS: nfsiod should not block forever in mempool_alloc() 2022-03-22 15:52:56 -04:00
proc.c NFS: NFSv2/v3 clients should never be setting NFS_CAP_XATTR 2022-02-25 18:50:13 -05:00
read.c nfs: Leave pages in the pagecache if readpage failed 2022-06-29 08:51:07 -04:00
super.c NFS client bugfixes for Linux 6.0 2022-09-12 17:53:46 -04:00
symlink.c fs: Change the type of filler_t 2022-05-09 16:36:48 -04:00
sysctl.c
sysfs.c Revert "NFSv4: use unique client identifiers in network namespaces" 2022-02-28 10:09:23 -05:00
sysfs.h
unlink.c NFSv4.1 mark qualified async operations as MOVEABLE tasks 2022-05-31 17:09:30 -04:00
write.c NFS client bugfixes for Linux 6.0 2022-09-12 17:53:46 -04:00