Skip to contentSkip to conversation

network auditing

DISCUSSION Russell Coker 2 participants 2 messages Aug 11, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

avc: granted { name_bind } for pid=21718 exe=/usr/bin/imapd scontext=system_u:system_r:courier_pop_t tcontext=system_u:object_r:port_t tclass=tcp_socket

On kernel 2.6.7 with the patch from the NSA site I get messages such as the above about port access. Can we get this changed to log the port number as it used to?

Signature · 9 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 7 lines · Russell Coker

avc: granted { name_bind } for pid=21718 exe=/usr/bin/imapd scontext=system_u:system_r:courier_pop_t tcontext=system_u:object_r:port_t tclass=tcp_socket

On kernel 2.6.7 with the patch from the NSA site I get messages such as the above about port access. Can we get this changed to log the port number as it used to?

The patch below should restore the behavior.

security/selinux/hooks.c +1 -0
diff -urN -X dontdiff linux-2.6.8-rc4.o/security/selinux/hooks.c linux-2.6.8-rc4.w/security/selinux/hooks.c
@@ -3078,6 +3078,7 @@
 				goto out;
 			AVC_AUDIT_DATA_INIT(&ad,NET);
 			ad.u.net.sport = htons(snum);
+			ad.u.net.family = family;
 			err = avc_has_perm(isec->sid, sid,
 					   isec->sclass,
 					   SOCKET__NAME_BIND, NULL, &ad);

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.