FYI: woody startup messages
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · you
there's a few other puzzles in there I'll try to solve myself, e.g. why proftpd tries to bind some high port.
Aug 27 12:56:57 nsa kernel: avc: denied { name_bind } for pid=254exe=/usr/sbin/proftpd port=5376 scontext=system_u:system_r:ftpd_t tcontext=system_u:object_r:ftp_port_t tclass=tcp_socket
5376 >> 8 = 21.
As a quick test on my system, "netcat -l -p 106" as user_t gives the following:
avc: denied { name_bind } for pid=22563 exe=/bin/nc port=27136 scontext=rjc:user_r:user_t tcontext=system_u:object_r:pop_port_t tclass=tcp_socket
Maybe there's one too many ntohs() calls in the audit code...
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
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.
Quoted 1 line · Russell Coker
Maybe there's one too many
ntohs()calls in the audit code...
maybe there is also a bug in the path output? look at this:
Aug 27 16:24:30 nsa kernel: avc: denied { getattr } for pid=614 exe=/bin/ls path=/local/bin dev=03:06 ino=1586155 scontext=tom:user_r:user_t tcontext=system_u:object_r:seuser_exec_t tclass=dir
Aug 27 16:24:30 nsa kernel: avc: denied { read } for pid=614 exe=/bin/ls path=/local/bin dev=03:06 ino=1586155 scontext=tom:user_r:user_t tcontext=system_u:object_r:seuser_exec_t tclass=dirthe command that caused this error was:
tom@nsa:~$ ls /usr/local/bin
and this is consistent. everywhere I look, the initial /usr is stripped from the path. same for content in /var, but not for /etc. on this system, /usr and /var are on their own partitions, /etc is not - is it possible that it strips the mount point away?
Signature · 8 lines
PGP/GPG key: http://web.lemuria.org/pubkey.html pub 1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]> Key fingerprint = C731 64D1 4BCF 4C20 48A4 29B2 BF01 9FA1 2D7A 04F5 -- 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.
Quoted 8 lines · Tom
maybe there is also a bug in the path output? look at this:
Aug 27 16:24:30 nsa kernel: avc: denied { getattr } for pid=614 exe=/bin/ls path=/local/bin dev=03:06 ino=1586155 scontext=tom:user_r:user_t tcontext=system_u:object_r:seuser_exec_t tclass=dir Aug 27 16:24:30 nsa kernel: avc: denied { read } for pid=614 exe=/bin/ls path=/local/bin dev=03:06 ino=1586155 scontext=tom:user_r:user_t tcontext=system_u:object_r:seuser_exec_t tclass=dirthe command that caused this error was:
Quoted 7 lines
tom@nsa:~$ ls /usr/local/binand this is consistent. everywhere I look, the initial /usr is stripped from the path. same for content in /var, but not for /etc. on this system, /usr and /var are on their own partitions, /etc is not - is it possible that it strips the mount point away?
This isn't a bug, and was asked previously on the list, most recently on 8/20 (http://marc.theaimsgroup.com/?l=selinux&m=102985179503728&w=2). You can only reconstruct an "absolute" (no such thing) pathname if you have a vfsmount and a dentry, and many of the file-related permission checks only have an inode or a dentry available at the point where they are checked. As with the port number issue, this merely affects the audit output, not the permission check. SELinux is inode-based, not path-based. The path information is merely a hint to help understand the audit message and is not reliable.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
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.
Quoted 9 lines · Stephen Smalley
This isn't a bug, and was asked previously on the list, most recently on 8/20 (http://marc.theaimsgroup.com/?l=selinux&m=102985179503728&w=2). You can only reconstruct an "absolute" (no such thing) pathname if you have a vfsmount and a dentry, and many of the file-related permission checks only have an inode or a dentry available at the point where they are checked. As with the port number issue, this merely affects the audit output, not the permission check. SELinux is inode-based, not path-based. The path information is merely a hint to help understand the audit message and is not reliable.
I see, thanks for the explanation. is there a better way to find a specific inode than "find /home -inum xxx" ?
Signature · 8 lines
PGP/GPG key: http://web.lemuria.org/pubkey.html pub 1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]> Key fingerprint = C731 64D1 4BCF 4C20 48A4 29B2 BF01 9FA1 2D7A 04F5 -- 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.
Quoted 11 lines · Tom
Quoted 9 lines · Stephen Smalley
This isn't a bug, and was asked previously on the list, most recently on 8/20 (http://marc.theaimsgroup.com/?l=selinux&m=102985179503728&w=2).
You can only reconstruct an "absolute" (no such thing) pathname if you have a vfsmount and a dentry, and many of the file-related permission checks only have an inode or a dentry available at the point where they are checked. As with the port number issue, this merely affects the audit output, not the permission check. SELinux is inode-based, not path-based. The path information is merely a hint to help understand the audit message and is not reliable.
Quoted 2 lines
I see, thanks for the explanation. is there a better way to find a specific inode than "find /home -inum xxx" ?
Not from user-space. This is why the path is logged...
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
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.
Quoted 14 lines · Tom
Quoted 1 line · Russell Coker
Maybe there's one too many
ntohs()calls in the audit code...maybe there is also a bug in the path output? look at this:
Aug 27 16:24:30 nsa kernel: avc: denied { getattr } for pid=614exe=/bin/ls path=/local/bin dev=03:06 ino=1586155 scontext=tom:user_r:user_t tcontext=system_u:object_r:seuser_exec_t tclass=dir Aug 27 16:24:30 nsa kernel: avc: denied { read } for pid=614 exe=/bin/ls path=/local/bin dev=03:06 ino=1586155 scontext=tom:user_r:user_t tcontext=system_u:object_r:seuser_exec_t tclass=dir
Quoted 3 lines
the command that caused this error was:
tom@nsa:~$ ls /usr/local/bin
dev=03:06 is /dev/hda6 which would be the device node for your /usr file system.
Steve previously mentioned that the mount point information is not easily available to that kernel code (and may be obscured in the case of mount --bind).
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
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.
Quoted 10 lines · Russell Coker
Quoted 6 lines · you
there's a few other puzzles in there I'll try to solve myself, e.g. why proftpd tries to bind some high port.
Aug 27 12:56:57 nsa kernel: avc: denied { name_bind } for pid=254exe=/usr/sbin/proftpd port=5376 scontext=system_u:system_r:ftpd_t tcontext=system_u:object_r:ftp_port_t tclass=tcp_socket
5376 >> 8 = 21.
Quoted 7 lines
As a quick test on my system, "netcat -l -p 106" as
user_tgives the following:
avc: denied {name_bind} for pid=22563 exe=/bin/nc port=27136 scontext=rjc:user_r:user_t tcontext=system_u:object_r:pop_port_t tclass=tcp_socketMaybe there's one too many
ntohs()calls in the audit code...
Yes, good call. avc_audit() calls ntohs() on the port number passed to it, but this port number was already converted to host order. Note that this is merely a bug in the audit output, not a problem with the permission check itself.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
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.