Skip to content

Commit

Permalink
TOMOYO: Accept \000 as a valid character.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tetsuo Handa authored and James Morris committed Jan 17, 2012
1 parent 89879a7 commit 25add8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions security/tomoyo/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 25add8c

Please sign in to comment.