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/include/net.h | |
| 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/include/net.h')
| -rw-r--r-- | security/apparmor/include/net.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/apparmor/include/net.h b/security/apparmor/include/net.h index 5089e937d550..0d0b0ce42723 100644 --- a/security/apparmor/include/net.h +++ b/security/apparmor/include/net.h @@ -47,8 +47,9 @@ #define NET_PEER_MASK (AA_MAY_SEND | AA_MAY_RECEIVE | AA_MAY_CONNECT | \ AA_MAY_ACCEPT) struct aa_sk_ctx { - struct aa_label *label; - struct aa_label *peer; + struct aa_label __rcu *label; + struct aa_label __rcu *peer; + struct aa_label __rcu *peer_lastupdate; /* ptr cmp only, no deref */ }; static inline struct aa_sk_ctx *aa_sock(const struct sock *sk) |