mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
apparmor: Fix incorrect profile->signal range check
The check on profile->signal is always false, the value can never be
less than 1 *and* greater than MAXMAPPED_SIG. Fix this by replacing
the logical operator && with ||.
Fixes: 84c455decf ("apparmor: add support for profiles to define the kill signal")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
committed by
John Johansen
parent
e9ed1eb8f6
commit
44fbeeb308
@@ -919,7 +919,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
|
||||
|
||||
/* optional */
|
||||
(void) aa_unpack_u32(e, &profile->signal, "kill");
|
||||
if (profile->signal < 1 && profile->signal > MAXMAPPED_SIG) {
|
||||
if (profile->signal < 1 || profile->signal > MAXMAPPED_SIG) {
|
||||
info = "profile kill.signal invalid value";
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user