From e77dc3460fa59be5759e9327ad882868eee9d61b Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Thu, 12 May 2011 06:40:51 +0900 Subject: TOMOYO: Fix wrong domainname validation. In tomoyo_correct_domain() since 2.6.36, TOMOYO was by error validating "" + "/foo/\" + "/bar" when " /foo/\* /bar" was given. As a result, legal domainnames like " /foo/\* /bar" are rejected. Reported-by: Hayama Yossihiro Signed-off-by: Tetsuo Handa Signed-off-by: James Morris --- security/tomoyo/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security/tomoyo/util.c') diff --git a/security/tomoyo/util.c b/security/tomoyo/util.c index 9bfc1ee8222d..6d5393204d95 100644 --- a/security/tomoyo/util.c +++ b/security/tomoyo/util.c @@ -390,7 +390,7 @@ bool tomoyo_correct_domain(const unsigned char *domainname) if (!cp) break; if (*domainname != '/' || - !tomoyo_correct_word2(domainname, cp - domainname - 1)) + !tomoyo_correct_word2(domainname, cp - domainname)) goto out; domainname = cp + 1; } -- cgit v1.2.3