diff options
author | John Johansen <john.johansen@canonical.com> | 2025-06-14 13:49:02 -0700 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2025-07-15 22:39:43 -0700 |
commit | a30a9fdb66319466a7c76b455524d27c75d2b05b (patch) | |
tree | 27e5836d6979adef7799a31c282a03ae8c3efaef /security/apparmor/af_unix.c | |
parent | bc6e5f6933b8e7b74858ac830d5b9b4ca10a099a (diff) |
apparmor: fix af_unix auditing to include all address information
The auditing of addresses currently doesn't include the source address
and mixes source and foreign/peer under the same audit name. Fix this
so source is always addr, and the foreign/peer is peer_addr.
Fixes: c05e705812d1 ("apparmor: add fine grained af_unix mediation")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/af_unix.c')
-rw-r--r-- | security/apparmor/af_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/af_unix.c b/security/apparmor/af_unix.c index 53ccf9becdf7..03d44fa19d12 100644 --- a/security/apparmor/af_unix.c +++ b/security/apparmor/af_unix.c @@ -584,8 +584,8 @@ static int unix_peer_perm(const struct cred *subj_cred, struct aa_profile *profile; DEFINE_AUDIT_SK(ad, op, subj_cred, sk); - ad.net.addr = peer_addr; - ad.net.addrlen = peer_addrlen; + ad.net.peer.addr = peer_addr; + ad.net.peer.addrlen = peer_addrlen; return fn_for_each_confined(label, profile, profile_peer_perm(profile, request, sk, |