mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +00:00
There is an integer overflow when comparing priorities when cmp is used because it uses subtraction to find lessthan, equal, and greater than in one operation. But INT_MAX and INT_MIN are being used by priorities and this results in INT_MAX - INT_MIN and INT_MIN - INT_MAX which are both overflows causing an incorrect comparison result and selection of the wrong rule permission. Closes: https://gitlab.com/apparmor/apparmor/-/issues/452 Fixes: e3fca60d1 ("parser: add the ability to specify a priority prefix to rules") Signed-off-by: John Johansen <john.johansen@canonical.com>
The apparmor_parser allows you to add, replace, and remove AppArmor policy through the use of command line options. The default is to add. `apparmor_parser --help` shows what the command line options are. You can also find more information at https://wiki.apparmor.net -- The AppArmor development team