Bug 468641 - SELinux is preventing swriter.bin from making the program stack executable.
SELinux is preventing swriter.bin from making the program stack executable.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
rawhide
All Linux
medium Severity high
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-26 21:42 EDT by eric@christensenplace.us
Modified: 2009-06-27 11:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-29 09:37:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Xorg.0.log (66.24 KB, text/plain)
2008-10-28 19:28 EDT, eric@christensenplace.us
no flags Details
The old Xorg.0.log (66.58 KB, text/plain)
2008-10-28 19:29 EDT, eric@christensenplace.us
no flags Details

  None (edit)
Description eric@christensenplace.us 2008-10-26 21:42:10 EDT
Description of problem: Openoffice.org-writer created over 200 SELinux alerts after trying to bring up a wizard.


Version-Release number of selected component (if applicable): openoffice.org-writer-1:3.0.0-9.5.fc10(i386)


How reproducible: Didn't try it again.


Steps to Reproduce:
1. Open writer.
2. Go to file -> wizard
3. Notice SELinux Troubleshooter alerting on Openoffice
  

Additional info:

Summary:

SELinux is preventing swriter.bin from making the program stack executable.

Detailed Description:

The swriter.bin application attempted to make its stack executable. This is a
potential security problem. This should never ever be necessary. Stack memory is
not executable on most OSes these days and this will not change. Executable
stack memory is one of the biggest security problems. An execstack error might
in fact be most likely raised by malicious code. Applications are sometimes
coded incorrectly and request this permission. The SELinux Memory Protection
Tests (http://people.redhat.com/drepper/selinux-mem.html) web page explains how
to remove this requirement. If swriter.bin does not work and you need it to
work, you can configure SELinux temporarily to allow this access until the
application is fixed. Please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Allowing Access:

Sometimes a library is accidentally marked with the execstack flag, if you find
a library with this flag you can clear it with the execstack -c LIBRARY_PATH.
Then retry your application. If the app continues to not work, you can turn the
flag back on with execstack -s LIBRARY_PATH. Otherwise, if you trust swriter.bin
to run correctly, you can change the context of the executable to
unconfined_execmem_exec_t. "chcon -t unconfined_execmem_exec_t
'/usr/lib/openoffice.org3/program/swriter.bin'" You must also change the default
file context files on the system in order to preserve them even on a full
relabel. "semanage fcontext -a -t unconfined_execmem_exec_t
'/usr/lib/openoffice.org3/program/swriter.bin'"

Fix Command:

chcon -t unconfined_execmem_exec_t
'/usr/lib/openoffice.org3/program/swriter.bin'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                None [ process ]
Source                        gnome-settings-
Source Path                   /usr/libexec/gnome-settings-daemon
Port                          <Unknown>
Host                          ericlaptop.christensenplace.us
Source RPM Packages           openoffice.org-writer-3.0.0-9.5.fc10
Target RPM Packages           
Policy RPM                    selinux-policy-3.5.13-5.fc10
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   allow_execstack
Host Name                     ericlaptop.christensenplace.us
Platform                      Linux ericlaptop.christensenplace.us
                              2.6.27.3-39.fc10.i686 #1 SMP Wed Oct 22 21:35:19
                              EDT 2008 i686 i686
Alert Count                   377
First Seen                    Wed 03 Sep 2008 06:50:04 AM EDT
Last Seen                     Sun 26 Oct 2008 09:30:52 PM EDT
Local ID                      81dc2ef3-90d7-4f8f-b203-c2ed3246d24a
Line Numbers                  

Raw Audit Messages            

node=ericlaptop.christensenplace.us type=AVC msg=audit(1225071052.274:470): avc:  denied  { execstack } for  pid=533 comm="swriter.bin" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process

node=ericlaptop.christensenplace.us type=SYSCALL msg=audit(1225071052.274:470): arch=40000003 syscall=125 success=no exit=-13 a0=bfecb000 a1=1000 a2=1000007 a3=fffff000 items=0 ppid=521 pid=533 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="swriter.bin" exe="/usr/lib/openoffice.org3/program/swriter.bin" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)
Comment 1 Caolan McNamara 2008-10-27 07:42:14 EDT
Almost certainly nothing to do with OOo, probably generic java related as the wizards stuff is written in java

Why the messages say:

Source                        gnome-settings-
Source Path                   /usr/libexec/gnome-settings-daemon

And the selinux link is followed to the letter by OOo itself.
Comment 2 Torsten Rausche 2008-10-27 08:44:08 EDT
Are you using the proprietary NVIDIA driver?

This could be related to bug 468678.
Comment 3 Torsten Rausche 2008-10-27 08:48:08 EDT
(In reply to comment #1)
> Why the messages say:
> 
> Source                        gnome-settings-
> Source Path                   /usr/libexec/gnome-settings-daemon

This could be a bug in the SELinux tools. I have got a lot of messages where this seems to be wrong. I guess it is time for another bug report...
Comment 4 eric@christensenplace.us 2008-10-27 09:00:05 EDT
I don't think I'm using anything proprietary.  I have not compiled anything specific for this computer.  I'm a bit scatter brained this morning so I may not be pulling it all together right now.
Comment 5 eric@christensenplace.us 2008-10-27 09:01:28 EDT
(In reply to comment #2)
> Are you using the proprietary NVIDIA driver?
> 
> This could be related to bug 468678.

Yes, these two could be related.  They occurred back to back but I reported them separately just in case.
Comment 6 eric@christensenplace.us 2008-10-27 09:03:56 EDT
(In reply to comment #5)
> (In reply to comment #2)
> > Are you using the proprietary NVIDIA driver?
> > 
> > This could be related to bug 468678.
> 
> Yes, these two could be related.  They occurred back to back but I reported
> them separately just in case.

Sorry, that's a different ticket.  I read it wrong...
Comment 7 Torsten Rausche 2008-10-27 10:03:30 EDT
(In reply to comment #4)
> I don't think I'm using anything proprietary.  I have not compiled anything
> specific for this computer.  I'm a bit scatter brained this morning so I may
> not be pulling it all together right now.

I also have not compiled anything and I get the same alerts -- but only if there is xorg-x11-drv-nvidia from rpmfusion/livna installed. This package provides the unloved and proprietary NVIDIA driver.

So it could be of interest:

1) which graphics card/chip you have
2) if you have installed drivers from any third party repositories like livna or rpmfusion

The content of your /var/log/Xorg.0.log could help here.
Comment 8 eric@christensenplace.us 2008-10-28 19:28:40 EDT
Created attachment 321733 [details]
Xorg.0.log

Here is the current log.
Comment 9 eric@christensenplace.us 2008-10-28 19:29:34 EDT
Created attachment 321734 [details]
The old Xorg.0.log

Not sure if there is a difference but here is the "old" log file as well.
Comment 10 eric@christensenplace.us 2008-10-28 19:31:25 EDT
Just did a quick query in Package Manager and I don't have any NVIDIA packages installed.
Comment 11 Torsten Rausche 2008-10-29 03:17:45 EDT
Well, any NVIDIA packages would be pretty needless as your logs show that you have ATI graphics hardware ;)

At least it shows that this problem is reproducible with a 100% open-source system. Up to now I could only reproduce it while using NVIDIA's binary driver. Thank you.
Comment 12 eric@christensenplace.us 2008-10-29 07:21:43 EDT
Yeah, I should have known that.  If you need me to test anything just let me know.
Comment 13 Daniel Walsh 2008-10-29 09:37:52 EDT
Running openoffice as unconfined_execmem_t with policy

selinux-policy-3.5.13-9.fc10.noarch

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