lists.openwall.net   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  linux-hardening  linux-cve-announce  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]
Message-Id: <20180726081049.10527-1-tomasbortoli@gmail.com>
Date:   Thu, 26 Jul 2018 10:10:49 +0200
From:   Tomas Bortoli <tomasbortoli@...il.com>
To:     ericvh@...il.com, rminnich@...dia.gov, lucho@...kov.net
Cc:     asmadeus@...ewreck.org, davem@...emloft.net,
        v9fs-developer@...ts.sourceforge.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, syzkaller@...glegroups.com,
        Tomas Bortoli <tomasbortoli@...il.com>
Subject: [PATCH] 9p: fix NULL pointer dereferences

In p9_fd_create_tcp() and p9_fd_create_unix() it is possible to get
a NULL value in the addr parameter. Return -EINVAL in such cases.

Signed-off-by: Tomas Bortoli <tomasbortoli@...il.com>
Reported-by: syzbot+1a262da37d3bead15c39@...kaller.appspotmail.com
---
 net/9p/trans_fd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 964260265b13..ecfceb659d0c 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -941,6 +941,9 @@ p9_fd_create_tcp(struct p9_client *client, const char *addr, char *args)
 	struct sockaddr_in sin_server;
 	struct p9_fd_opts opts;
 
+	if (addr == NULL)
+		return -EINVAL;
+
 	err = parse_opts(args, &opts);
 	if (err < 0)
 		return err;
@@ -995,6 +998,9 @@ p9_fd_create_unix(struct p9_client *client, const char *addr, char *args)
 
 	csocket = NULL;
 
+	if (addr == NULL)
+		return -EINVAL;
+
 	if (strlen(addr) >= UNIX_PATH_MAX) {
 		pr_err("%s (%d): address too long: %s\n",
 		       __func__, task_pid_nr(current), addr);
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ