lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 3 Jul 2011 09:40:12 +0200 (CEST)
From:	Jesper Juhl <>
cc:	Trond Myklebust <>,, Gero Kuhlmann <>
Subject: [PATCH] nfs: Don't deref potentially NULL pointer returned by

In fs/nfs/nfsroot.c:root_nfs_parse_options() we call strsep(), which
may return NULL, but we do not test the return value before
dereferencing the pointer.

Signed-off-by: Jesper Juhl <>
 fs/nfs/nfsroot.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

  Compile tested only.

diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
index c4744e1..b6ac860 100644
--- a/fs/nfs/nfsroot.c
+++ b/fs/nfs/nfsroot.c
@@ -191,6 +191,8 @@ static int __init root_nfs_parse_options(char *incoming, char *exppath,
 	 * Set the NFS remote path
 	p = strsep(&incoming, ",");
+	if (!p)
+		return -1;
 	if (*p != '\0' && strcmp(p, "default") != 0)
 		if (root_nfs_copy(exppath, p, exppathlen))
 			return -1;

Jesper Juhl <>
Don't top-post
Plain text mails only, please.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists