summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorHawkins Jiawei <yin31149@gmail.com>2022-10-23 19:39:45 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-12-06 18:43:24 +0300
commit5559405df652008e56eee88872126fe4c451da67 (patch)
tree06482691076b88a6726698c286192d218351d307 /fs/nfs/nfs4proc.c
parentd564d2c4c2445cb0972453933dc87c2dcaac8597 (diff)
downloadlinux-5559405df652008e56eee88872126fe4c451da67.tar.xz
nfs: fix possible null-ptr-deref when parsing param
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>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
0 files changed, 0 insertions, 0 deletions