aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/policy_unpack.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2019-05-26 06:42:23 -0700
committerJohn Johansen <john.johansen@canonical.com>2019-06-18 16:04:16 -0700
commit23375b13f98c5464c2b4d15f983cc062940f1f4e (patch)
tree13b8eacded2d8e3ddc80eb1ee00fa12c398ed6dd /security/apparmor/policy_unpack.c
parentLinux 5.2-rc5 (diff)
downloadlinux-dev-23375b13f98c5464c2b4d15f983cc062940f1f4e.tar.xz
linux-dev-23375b13f98c5464c2b4d15f983cc062940f1f4e.zip
apparmor: fix PROFILE_MEDIATES for untrusted input
While commit 11c236b89d7c2 ("apparmor: add a default null dfa") ensure every profile has a policy.dfa it does not resize the policy.start[] to have entries for every possible start value. Which means PROFILE_MEDIATES is not safe to use on untrusted input. Unforunately commit b9590ad4c4f2 ("apparmor: remove POLICY_MEDIATES_SAFE") did not take into account the start value usage. The input string in profile_query_cb() is user controlled and is not properly checked to be within the limited start[] entries, even worse it can't be as userspace policy is allowed to make us of entries types the kernel does not know about. This mean usespace can currently cause the kernel to access memory up to 240 entries beyond the start array bounds. Cc: stable@vger.kernel.org Fixes: b9590ad4c4f2 ("apparmor: remove POLICY_MEDIATES_SAFE") Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/policy_unpack.c')
0 files changed, 0 insertions, 0 deletions