diff options
author | John Johansen <john.johansen@canonical.com> | 2025-06-19 22:11:52 -0700 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2025-07-20 02:19:27 -0700 |
commit | 88fec3526e84123997ecebd6bb6778eb4ce779b7 (patch) | |
tree | d2bc332367530918e0abd2d34aeacb02462c916b /security/apparmor/net.c | |
parent | 6456ccbd2ff72814b3c1b2e2a3a2145a2ced858d (diff) |
apparmor: make sure unix socket labeling is correctly updated.
When a unix socket is passed into a different confinement domain make
sure its cached mediation labeling is updated to correctly reflect
which domains are using the socket.
Fixes: c05e705812d1 ("apparmor: add fine grained af_unix mediation")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/net.c')
-rw-r--r-- | security/apparmor/net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/net.c b/security/apparmor/net.c index 2da554cc3a35..7382069efd7d 100644 --- a/security/apparmor/net.c +++ b/security/apparmor/net.c @@ -292,7 +292,7 @@ static int aa_label_sk_perm(const struct cred *subj_cred, AA_BUG(!label); AA_BUG(!sk); - if (ctx->label != kernel_t && !unconfined(label)) { + if (rcu_access_pointer(ctx->label) != kernel_t && !unconfined(label)) { struct aa_profile *profile; DEFINE_AUDIT_SK(ad, op, subj_cred, sk); |