]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
apparmor: fix mediation of prlimit
authorJohn Johansen <john.johansen@canonical.com>
Wed, 11 Apr 2018 09:03:26 +0000 (02:03 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Apr 2018 15:35:37 +0000 (10:35 -0500)
commit6827f32b8628c340a51292f49065a99cead07285
tree9dbe1a2ff76e55968ccb536b1fe60d2f866b6412
parenta9cfa10d7ccbd738809cd1129a9a13384d3b3de2
apparmor: fix mediation of prlimit

BugLink: http://bugs.launchpad.net/bugs/1763427
For primit apparmor requires that if target confinement does not match
the setting task's confinement, the setting task requires CAP_SYS_RESOURCE.

Unfortunately this was broken when rlimit enforcement was reworked to
support labels.

Fixes: 86b92cb782b3 ("apparmor: move resource checks to using labels")
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit a4c2746f4d4b32d8557ee17821f1101fd8474f92
 git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/apparmor/resource.c