Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 84c455decf27 ("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>

authored by

Colin Ian King and committed by
John Johansen
44fbeeb3 e9ed1eb8

+1 -1
+1 -1
security/apparmor/policy_unpack.c
··· 919 919 920 920 /* optional */ 921 921 (void) aa_unpack_u32(e, &profile->signal, "kill"); 922 - if (profile->signal < 1 && profile->signal > MAXMAPPED_SIG) { 922 + if (profile->signal < 1 || profile->signal > MAXMAPPED_SIG) { 923 923 info = "profile kill.signal invalid value"; 924 924 goto fail; 925 925 }