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: <1410537212-3153-1-git-send-email-waydi1@gmail.com>
Date:	Sat, 13 Sep 2014 00:53:32 +0900
From:	Seunghun Lee <waydi1@...il.com>
To:	viro@...iv.linux.org.uk
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Seunghun Lee <waydi1@...il.com>
Subject: [PATCH] vfs: remove redundant sanity check in do_mount

In sys_mount, getname() checks dir_name.
So do_mount needn't check dir_name again.

Signed-off-by: Seunghun Lee <waydi1@...il.com>
---
 fs/namespace.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index bfd03c6..bf8a9af 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2553,11 +2553,6 @@ long do_mount(const char *dev_name, const char *dir_name,
 	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
 		flags &= ~MS_MGC_MSK;
 
-	/* Basic sanity checks */
-
-	if (!dir_name || !*dir_name || !memchr(dir_name, 0, PAGE_SIZE))
-		return -EINVAL;
-
 	if (data_page)
 		((char *)data_page)[PAGE_SIZE - 1] = 0;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ