summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorTetsuo Handa <from-tomoyo-users-en@I-love.SAKURA.ne.jp>2012-01-15 11:05:59 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-25 16:13:45 -0800
commitf42395415b6b335ddd8c32776d3fa44dae3cdf21 (patch)
treee19418f3220ed6de41cbeaa53cd156212b7ad394 /security
parent3991280f9562f5cdb13d7b4999f63dd8b9c3f207 (diff)
TOMOYO: Accept \000 as a valid character.
commit 25add8cf99c9ec8b8dc0acd8b9241e963fc0d29c upstream. TOMOYO 2.5 in Linux 3.2 and later handles Unix domain socket's address. Thus, tomoyo_correct_word2() needs to accept \000 as a valid character, or TOMOYO 2.5 cannot handle Unix domain's abstract socket address. Reported-by: Steven Allen <steven@stebalien.com> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'security')
-rw-r--r--security/tomoyo/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/tomoyo/util.c b/security/tomoyo/util.c
index 4a9b4b2eb755..867558c98334 100644
--- a/security/tomoyo/util.c
+++ b/security/tomoyo/util.c
@@ -492,13 +492,13 @@ static bool tomoyo_correct_word2(const char *string, size_t len)
if (d < '0' || d > '7' || e < '0' || e > '7')
break;
c = tomoyo_make_byte(c, d, e);
- if (tomoyo_invalid(c))
- continue; /* pattern is not \000 */
+ if (c <= ' ' || c >= 127)
+ continue;
}
goto out;
} else if (in_repetition && c == '/') {
goto out;
- } else if (tomoyo_invalid(c)) {
+ } else if (c <= ' ' || c >= 127) {
goto out;
}
}