mkdir avc
Hi,
When there is a denial doing mkdir syscall, should there be an avc_path or path audit record? Example:
type=AVC msg=audit(1118918038.404:14545): avc: denied { create } for pid=4407 comm="useradd" name="usertwo" scontext=root:sysadm_r:useradd_t:s0-s15:c0.c1023 tcontext=root:object_r:user_home_dir_t:s0 tclass=dir
type=SYSCALL msg=audit(1118918038.404:14545): arch=c000003e syscall=83 success=no exit=-13 a0=813cc0 a1=0 a2=2 a3=1 items=0 ppid=4222 pid=4407 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 comm="useradd" exe="/usr/sbin/useradd" subj=root:sysadm_r:useradd_t:s0-s15:c0.c1023 key=(null)
Seems like we should know the path being created or the parent dir where it failed.
Thanks,
-Steve
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
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 13 lines · Steve G
Hi,
When there is a denial doing mkdir syscall, should there be an
avc_pathor path audit record? Example:type=AVC msg=audit(1118918038.404:14545): avc: denied { create } for pid=4407 comm="useradd" name="usertwo" scontext=root:sysadm_r:useradd_t:s0-s15:c0.c1023 tcontext=root:object_r:user_home_dir_t:s0 tclass=dir
type=SYSCALL msg=audit(1118918038.404:14545): arch=c000003e syscall=83 success=no exit=-13 a0=813cc0 a1=0 a2=2 a3=1 items=0 ppid=4222 pid=4407 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 comm="useradd" exe="/usr/sbin/useradd" subj=root:sysadm_r:useradd_t:s0-s15:c0.c1023 key=(null)
Quoted 2 lines
Seems like we should know the path being created or the parent dir where it failed.
The necessary information (vfsmount) isn't available to the AVC, so it cannot create such a record. I would have expected the syscall audit record to have captured the path, but am not seeing it now either (but do see it in older audit logs). Regression in the audit code?
Signature · 8 lines
Stephen Smalley National Security Agency -- 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 4 lines
I would have expected the syscall audit record to have captured the path, but am not seeing it now either (but do see it in older audit logs). Regression in the audit code?
Could be...that's why I'm asking. I wanted to get confirmation that one or the other should be there. When you audit the mkdir syscall, a path record is there. But in the case of the avc, its not.
-Steve
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
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 7 lines · Steve G
Quoted 3 lines
I would have expected the syscall audit record to have captured the path, but am not seeing it now either (but do see it in older audit logs). Regression in the audit code?
Could be...that's why I'm asking. I wanted to get confirmation that one or the other should be there. When you audit the mkdir syscall, a path record is there. But in the case of the avc, its not.
Related to the optimization for no audit filters (suppressing collection of path in that case)?
Signature · 8 lines
Stephen Smalley National Security Agency -- 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 · Stephen Smalley
Quoted 7 lines · Steve G
Quoted 3 lines
I would have expected the syscall audit record to have captured the path, but am not seeing it now either (but do see it in older audit logs). Regression in the audit code?
Could be...that's why I'm asking. I wanted to get confirmation that one or the other should be there. When you audit the mkdir syscall, a path record is there. But in the case of the avc, its not.
Related to the optimization for no audit filters (suppressing collection of path in that case)?
Ok, tried adding and removing a simple audit filter on execve (i.e. anything but mkdir), and it changed the behavior. With the filter, a PATH record was generated; without it, it was not generated. So as long as you have some audit filter defined, you should get the PATH data for the avc denial.
Signature · 8 lines
Stephen Smalley National Security Agency -- 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.