[SRU][Q][PATCH 2/2] UBUNTU: SAUCE: apparmor5.0.0 [53/57]: apparmor: fix af_unix local addr mediation binding
Georgia Garcia
georgia.garcia at canonical.com
Thu Apr 2 18:49:23 UTC 2026
From: John Johansen <john.johansen at canonical.com>
BugLink: http://bugs.launchpad.net/bugs/2142956
The local address bind is broken because the local address is shadowed.
Fix this by removing the shadowing variable. Also make sure the net
class is correctly recorded in the audit log.
Fixes: ace129477b6b ("UBUNTU: SAUCE: apparmor5.0.0 [14/38]: apparmor: net: add fine grained ipv4/ipv6 mediation")
Signed-off-by: John Johansen <john.johansen at canonical.com>
(cherry picked from commit 7cb6769a2d96ab3b6da8ca401936a22745523bad resolute:linux)
Signed-off-by: Georgia Garcia <georgia.garcia at canonical.com>
---
security/apparmor/af_inet.c | 2 +-
security/apparmor/audit.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/apparmor/af_inet.c b/security/apparmor/af_inet.c
index 5255595a6876..7e46e4711b63 100644
--- a/security/apparmor/af_inet.c
+++ b/security/apparmor/af_inet.c
@@ -808,7 +808,7 @@ int aa_inet_file_perm(const struct cred *subj_cred, struct aa_label *label,
&ad));
if (!error) {
- struct stored_match_addr laddr, raddr;
+ struct stored_match_addr raddr;
/* TODO: have ad here: instead of in CB so we do have to redo */
error = map_sock_addr(sock, ADDR_REMOTE, &raddr, NULL);
diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
index dc3b419279f8..6a395d18f190 100644
--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -52,7 +52,7 @@ static const char *const aa_class_names[] = {
"unknown",
"unknown",
"net",
- "unknown",
+ "netv9",
"label",
"posix_mqueue",
"io_uring",
--
2.43.0
More information about the kernel-team
mailing list