Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e77dc346 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by James Morris
Browse files

TOMOYO: Fix wrong domainname validation.



In tomoyo_correct_domain() since 2.6.36, TOMOYO was by error validating
"<kernel>" + "/foo/\" + "/bar" when "<kernel> /foo/\* /bar" was given.
As a result, legal domainnames like "<kernel> /foo/\* /bar" are rejected.

Reported-by: default avatarHayama Yossihiro <yossi@yedo.src.co.jp>
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 3a852d3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}