diff options
author | Tetsuo Handa <from-tomoyo-users-en@I-love.SAKURA.ne.jp> | 2012-01-14 21:05:59 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-01-17 18:40:59 -0500 |
commit | 25add8cf99c9ec8b8dc0acd8b9241e963fc0d29c (patch) | |
tree | 1fb0c0fadcf7544fee117f27ac667e4c444d634b /security | |
parent | 89879a7eb81f69e6f63bdb2a442fb765c46482c0 (diff) |
TOMOYO: Accept \000 as a valid character.
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>
CC: stable@vger.kernel.org [3.2+]
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/tomoyo/util.c | 6 |
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) | |||
492 | if (d < '0' || d > '7' || e < '0' || e > '7') | 492 | if (d < '0' || d > '7' || e < '0' || e > '7') |
493 | break; | 493 | break; |
494 | c = tomoyo_make_byte(c, d, e); | 494 | c = tomoyo_make_byte(c, d, e); |
495 | if (tomoyo_invalid(c)) | 495 | if (c <= ' ' || c >= 127) |
496 | continue; /* pattern is not \000 */ | 496 | continue; |
497 | } | 497 | } |
498 | goto out; | 498 | goto out; |
499 | } else if (in_repetition && c == '/') { | 499 | } else if (in_repetition && c == '/') { |
500 | goto out; | 500 | goto out; |
501 | } else if (tomoyo_invalid(c)) { | 501 | } else if (c <= ' ' || c >= 127) { |
502 | goto out; | 502 | goto out; |
503 | } | 503 | } |
504 | } | 504 | } |