Bug 923516 - SELinux is preventing /usr/sbin/setfiles from using the 'execmem' accesses on a process.
Summary: SELinux is preventing /usr/sbin/setfiles from using the 'execmem' accesses on...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f20865a6bb0761ec7c444c8bd8e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-20 02:53 UTC by cyrushmh
Modified: 2014-02-05 20:07 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-02-05 20:07:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Comment (164.19 KB, text/plain)
2013-03-20 13:13 UTC, cyrushmh
no flags Details

Description cyrushmh 2013-03-20 02:53:11 UTC
Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.3-203.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-03-20 11:53:07 UTC
Could you please add also AVC msg which you are getting?

Comment 2 cyrushmh 2013-03-20 13:13:10 UTC
Created attachment 915681 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 3 Daniel Walsh 2013-03-20 15:13:47 UTC
This is very strange.  These apps definitely do not do execmem.  Do you have something like a replacement for glibc?  

type=SYSCALL msg=audit(03/19/2013 09:20:04.944:1755) : arch=x86_64 syscall=mmap success=no exit=-13(Permission denied) a0=0x7ffaabf6f000 a1=0x3f000 a2=PROT_READ|PROT_WRITE|PROT_EXEC a3=MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE items=0 ppid=17248 pid=17590 auid=dwalsh uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root ses=33 tty=pts6 comm=restorecon exe=/usr/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(03/19/2013 09:20:04.944:1755) : avc:  denied  { execmem } for  pid=17590 comm=restorecon scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tclass=process 

Eric could this be the prce stuff?

Comment 4 Daniel Walsh 2013-03-20 15:16:46 UTC
 cyrushmh

Could you give us the output of 

ls -latr /etc/selinux/targeted/contexts/files/

Comment 5 Eric Paris 2013-03-20 21:33:02 UTC
unless it is a bug in libpcre, we don't do it intentionally, that's for sure...  can we reproduce under strace?  it might help us figure out where in the code this is happening...

Comment 6 cyrushmh 2013-03-21 09:29:34 UTC
(In reply to comment #3)
> This is very strange.  These apps definitely do not do execmem.  Do you have
> something like a replacement for glibc?  
> 
> type=SYSCALL msg=audit(03/19/2013 09:20:04.944:1755) : arch=x86_64
> syscall=mmap success=no exit=-13(Permission denied) a0=0x7ffaabf6f000
> a1=0x3f000 a2=PROT_READ|PROT_WRITE|PROT_EXEC
> a3=MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE items=0 ppid=17248 pid=17590
> auid=dwalsh uid=root gid=root euid=root suid=root fsuid=root egid=root
> sgid=root fsgid=root ses=33 tty=pts6 comm=restorecon exe=/usr/sbin/setfiles
> subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null) 
> type=AVC msg=audit(03/19/2013 09:20:04.944:1755) : avc:  denied  { execmem }
> for  pid=17590 comm=restorecon
> scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023
> tcontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tclass=process 
> 
> Eric could this be the prce stuff?
 sorry , I don't know..


(In reply to comment #4)
>  cyrushmh
> 
> Could you give us the output of 
> 
> ls -latr /etc/selinux/targeted/contexts/files/
ls -latr /etc/selinux/targeted/contexts/files/
总用量(total) 1468
-rw-r--r--. 1 root root     139 3月(march)  14 05:56 media
-rw-r--r--. 1 root root     338 3月  14 05:56 file_contexts.subs_dist
-rw-r--r--. 1 root root       0 3月  14 05:56 file_contexts.subs
-rw-r--r--. 1 root root       0 3月  14 05:57 file_contexts.local
-rw-r--r--. 1 root root   10959 3月  16 11:07 file_contexts.homedirs
-rw-r--r--. 1 root root  308117 3月  16 11:07 file_contexts
drwxr-xr-x. 4 root root    4096 3月  16 11:07 ..
-rw-r--r--. 1 root root 1119658 3月  16 11:07 file_contexts.bin
-rw-r--r--. 1 root root      16 3月  16 11:07 file_contexts.local.bin
-rw-r--r--. 1 root root   36548 3月  16 11:07 file_contexts.homedirs.bin
drwxr-xr-x. 2 root root    4096 3月  16 11:07 .




(In reply to comment #5)
> unless it is a bug in libpcre, we don't do it intentionally, that's for
> sure...  can we reproduce under strace?  it might help us figure out where
> in the code this is happening...
...

Comment 7 Stephen Smalley 2013-03-21 12:28:24 UTC
Versions of policycoreutils (setfiles), libselinux, libsepol, audit-libs, glibc, and pcre-devel?

Output of the following commands:
execstack -q /usr/sbin/setfiles 

execstack -q `ldd /usr/sbin/setfiles | awk '{print $3}'

strace restorecon $HOME

Comment 8 cyrushmh 2013-03-22 09:09:49 UTC
(In reply to comment #7)
> Versions of policycoreutils (setfiles), libselinux, libsepol, audit-libs,
> glibc, and pcre-devel?
> 
> Output of the following commands:
> execstack -q /usr/sbin/setfiles 
output:   - /usr/sbin/setfiles
> 
> execstack -q `ldd /usr/sbin/setfiles | awk '{print $3}'
output:   > 
> 
> strace restorecon $HOME
output:   >


Am I right??

Comment 9 cyrushmh 2013-03-22 09:10:31 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Versions of policycoreutils (setfiles), libselinux, libsepol, audit-libs,
> > glibc, and pcre-devel?
> > 
> > Output of the following commands:
> > execstack -q /usr/sbin/setfiles 
> output:   - /usr/sbin/setfiles
> > 
> > execstack -q `ldd /usr/sbin/setfiles | awk '{print $3}'
> output:   > 
> > 
> > strace restorecon $HOME
> output:   bash: strace: 未找到命令
> 
> 
> Am I right??

Comment 10 Fedora End Of Life 2013-12-21 12:18:40 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2014-02-05 20:07:57 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.