map_addr should be able to receive NULL for addr, since that is what
is being done on map_sock_addr when the socket is not connected.

Fixes: 89ac6aa752ec ("apparmor: push inet mediation into profile callbacks, and 
improve auditing")
Signed-off-by: Georgia Garcia <[email protected]>
---
 security/apparmor/af_inet.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/apparmor/af_inet.c b/security/apparmor/af_inet.c
index 516c9016537c..68e4b1449c40 100644
--- a/security/apparmor/af_inet.c
+++ b/security/apparmor/af_inet.c
@@ -97,7 +97,6 @@ static int map_addr(struct sockaddr *addr, int addrlen, u16 
raw_port,
        struct sockaddr_in *addr4 = NULL;
        struct sockaddr_in6 *addr6 = NULL;
 
-       AA_BUG(!addr);
        AA_BUG(!maddr);
 
        maddr->addrtype = addrtype;
-- 
2.43.0


Reply via email to