Skip to content

fs: fix possible null-ptr-deref when parsing param

Hawkins Jiawei ceph-devel cluster-devel linux-cifs linux-fsdevel linux-nfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5smb3: fix possible null-ptr-deref when parsing paramfs/cifs/fs_context.c+57 -10 replies
2/5nfs: fix possible null-ptr-deref when parsing paramfs/nfs/fs_context.c+6 -01 reply
3/5ceph: fix possible null-ptr-deref when parsing paramfs/ceph/super.c+3 -04 replies
4/5gfs2: fix possible null-ptr-deref when parsing paramfs/gfs2/ops_fstype.c+10 -01 reply
5/5proc: fix possible null-ptr-deref when parsing paramfs/proc/root.c+3 -00 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

Patch[email protected]Jeff Layton
1/5
2/5R-b
3/5
4/5T-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH -next 0/5] fs: 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, when fs parses its mount parameters, it will dereferences the param->string, without checking whether it is a null pointer, which may trigger a null-ptr-deref bug.

So this patchset reviews all functions for fs to parse parameters, by using git grep -n "\.parse_param" fs/*, and adds sanity check on param->string if its function will dereference param->string without check.

Hawkins Jiawei (5):
smb3: fix possible null-ptr-deref when parsing param
nfs: fix possible null-ptr-deref when parsing param
ceph: fix possible null-ptr-deref when parsing param
gfs2: fix possible null-ptr-deref when parsing param
proc: fix possible null-ptr-deref when parsing param

 fs/ceph/super.c      |  3 +++
 fs/cifs/fs_context.c | 58 +++++++++++++++++++++++++++++++++++++++++++-
 fs/gfs2/ops_fstype.c | 10 ++++++++
 fs/nfs/fs_context.c  |  6 +++++
 fs/proc/root.c       |  3 +++
 5 files changed, 79 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1