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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 26 Oct 2020 20:10:37 -0400
From:   Sasha Levin <>
Cc:     Anant Thazhemadam <>,,
        Dominique Martinet <>,
        Sasha Levin <>,,
Subject: [PATCH AUTOSEL 4.9 23/30] net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid

From: Anant Thazhemadam <>

[ Upstream commit 7ca1db21ef8e0e6725b4d25deed1ca196f7efb28 ]

In p9_fd_create_unix, checking is performed to see if the addr (passed
as an argument) is NULL or not.
However, no check is performed to see if addr is a valid address, i.e.,
it doesn't entirely consist of only 0's.
The initialization of sun_server.sun_path to be equal to this faulty
addr value leads to an uninitialized variable, as detected by KMSAN.
Checking for this (faulty addr) and returning a negative error number
appropriately, resolves this issue.

Signed-off-by: Anant Thazhemadam <>
Signed-off-by: Dominique Martinet <>
Signed-off-by: Sasha Levin <>
 net/9p/trans_fd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index bad27b0ec65d6..33b317a25a2d5 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -1013,7 +1013,7 @@ p9_fd_create_unix(struct p9_client *client, const char *addr, char *args)
 	csocket = NULL;
-	if (addr == NULL)
+	if (!addr || !strlen(addr))
 		return -EINVAL;
 	if (strlen(addr) >= UNIX_PATH_MAX) {

Powered by blists - more mailing lists