Skip to contentSkip to conversation

lnk_file:write

DISCUSSION Russell Coker 3 participants 4 messages Mar 4, 2010 SELinux security module

lore
Share & tools
lore
#0 lore raw
[   12.814762] type=1400 audit(1267664699.904:8): avc:  denied  { write } for  
pid=726 comm="udevd" name="4:66" dev=tmpfs ino=1767 
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 
tcontext=system_u:object_r:device_t:s0 tclass=lnk_file
[   12.814802] type=1300 audit(1267664699.904:8): arch=c000003e syscall=280 

success=no exit=-13 a0=ffffffffffffff9c a1=1e69110 a2=0 a3=100 items=0 ppid=689 pid=726 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="udevd" exe="/sbin/udevd" subj=system_u:system_r:udev_t:s0-s0:c0.c1023 key=(null)

I'm seeing messages like the above in my kernel message log when running the latest Debian/Testing (2.6.32 kernel and udev 151-2).

        { 4,    TD|TF,  sys_utimensat,          "utimensat"     }, /* 280 */

According to the above from the strace source it seems that on AMD64 syscall 280 is utimensat().

Should we update manage_lnk_file_perms to include write access?

Signature · 8 lines
[email protected]
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog

--
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 13 lines · Russell Coker
[   12.814762] type=1400 audit(1267664699.904:8): avc:  denied  { write } for  
pid=726 comm="udevd" name="4:66" dev=tmpfs ino=1767 
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 
tcontext=system_u:object_r:device_t:s0 tclass=lnk_file
[   12.814802] type=1300 audit(1267664699.904:8): arch=c000003e syscall=280 

success=no exit=-13 a0=ffffffffffffff9c a1=1e69110 a2=0 a3=100 items=0 ppid=689 pid=726 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="udevd" exe="/sbin/udevd" subj=system_u:system_r:udev_t:s0-s0:c0.c1023 key=(null)

I'm seeing messages like the above in my kernel message log when running the latest Debian/Testing (2.6.32 kernel and udev 151-2).

Quoted 6 lines
        { 4,    TD|TF,  sys_utimensat,          "utimensat"     }, /* 280 */

According to the above from the strace source it seems that on AMD64 syscall 280 is utimensat().

Should we update manage_lnk_file_perms to include write access?

It sounds like a bug that it isn't in the permission set. "Manage" normally means create, read, write, and delete.

Signature · 10 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150



--
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.
#2 lore raw
In reply to Russell Coker
Quoted 13 lines · Russell Coker
[   12.814762] type=1400 audit(1267664699.904:8): avc:  denied  { write } for  
pid=726 comm="udevd" name="4:66" dev=tmpfs ino=1767 
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 
tcontext=system_u:object_r:device_t:s0 tclass=lnk_file
[   12.814802] type=1300 audit(1267664699.904:8): arch=c000003e syscall=280 

success=no exit=-13 a0=ffffffffffffff9c a1=1e69110 a2=0 a3=100 items=0 ppid=689 pid=726 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="udevd" exe="/sbin/udevd" subj=system_u:system_r:udev_t:s0-s0:c0.c1023 key=(null)

I'm seeing messages like the above in my kernel message log when running the latest Debian/Testing (2.6.32 kernel and udev 151-2).

Quoted 6 lines
        { 4,    TD|TF,  sys_utimensat,          "utimensat"     }, /* 280 */

According to the above from the strace source it seems that on AMD64 syscall 280 is utimensat().

Should we update manage_lnk_file_perms to include write access?

Sounds legitimate. In mainline, SELinux has always checked file write permission for the utimes(NULL) case rather than setattr permission. Likely people didn't think it was necessary because you never truly "write" to a symlink.

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.
#3 lore raw
Quoted 19 lines · Stephen Smalley
Quoted 18 lines · Russell Coker
[   12.814762] type=1400 audit(1267664699.904:8): avc:  denied  { write } for  
pid=726 comm="udevd" name="4:66" dev=tmpfs ino=1767 
scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 
tcontext=system_u:object_r:device_t:s0 tclass=lnk_file
[   12.814802] type=1300 audit(1267664699.904:8): arch=c000003e syscall=280 

success=no exit=-13 a0=ffffffffffffff9c a1=1e69110 a2=0 a3=100 items=0 ppid=689 pid=726 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="udevd" exe="/sbin/udevd" subj=system_u:system_r:udev_t:s0-s0:c0.c1023 key=(null)

I'm seeing messages like the above in my kernel message log when running the latest Debian/Testing (2.6.32 kernel and udev 151-2).

        { 4,    TD|TF,  sys_utimensat,          "utimensat"     }, /* 280 */

According to the above from the strace source it seems that on AMD64 syscall 280 is utimensat().

Quoted 6 lines
Quoted 1 line

Should we update manage_lnk_file_perms to include write access?

Sounds legitimate. In mainline, SELinux has always checked file write permission for the utimes(NULL) case rather than setattr permission. Likely people didn't think it was necessary because you never truly "write" to a symlink.

I've committed this change.

Signature · 10 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150



--
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.