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>] [day] [month] [year] [list]
Message-ID: <553ACEE2.3030407@fb.com>
Date:	Fri, 24 Apr 2015 16:16:50 -0700
From:	"Daniel Colascione (SEATTLE)" <dancol@...com>
To:	<linux-kernel@...r.kernel.org>
Subject: Shouldn't mangle_path always mangle '\\'?

mangle_path accepts a string listing the characters it's supposed to
escape. Some, but not all, callers put backslash in this set. Shouldn't
we be escaping '\' regardless, since it's the character used to signal
all other escapes?

diff --git a/fs/seq_file.c b/fs/seq_file.c
index 555f821..02dcd5c 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -443,7 +443,7 @@ char *mangle_path(char *s, const char *p, const char
*esc)
 		char c = *p++;
 		if (!c) {
 			return s;
-		} else if (!strchr(esc, c)) {
+		} else if (s != '\\' && !strchr(esc, c)) {
 			*s++ = c;
 		} else if (s + 4 > p) {
 			break;


Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ