]> www.infradead.org Git - users/jedix/linux-maple.git/commit
apparmor: audit_cap dedup based on subj_cred instead of profile
authorRyan Lee <ryan.lee@canonical.com>
Wed, 25 Sep 2024 18:30:11 +0000 (11:30 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 27 Nov 2024 03:21:06 +0000 (19:21 -0800)
commit74a96bbe1294b0a118e173ce20f60f5838aabaed
tree3bf914b8ff35d29f957f3c57fb4f35380b8a8306
parentfee7a2340f18f48713a4ac7dd5e42b77d963062f
apparmor: audit_cap dedup based on subj_cred instead of profile

The previous audit_cap cache deduping was based on the profile that was
being audited. This could cause confusion due to the deduplication then
occurring across multiple processes, which could happen if multiple
instances of binaries matched the same profile attachment (and thus ran
under the same profile) or a profile was attached to a container and its
processes.

Instead, perform audit_cap deduping over ad->subj_cred, which ensures the
deduping only occurs across a single process, instead of across all
processes that match the current one's profile.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/capability.c