Skip to content

Commit

Permalink
TOMOYO: Fix wrong domainname validation.
Browse files Browse the repository at this point in the history
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: Hayama Yossihiro <yossi@yedo.src.co.jp>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Tetsuo Handa authored and James Morris committed May 12, 2011
1 parent 3a852d3 commit e77dc34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/tomoyo/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e77dc34

Please sign in to comment.