Bug 542586 - libjvm.so has executable stack flag
Summary: libjvm.so has executable stack flag
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: 12
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Martin Matejovic
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 540153 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-30 09:26 UTC by Jan Pazdziora (Red Hat)
Modified: 2010-03-23 23:27 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-03-16 08:38:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2009-11-30 09:26:19 UTC
Description of problem:

The libjvm.so file has executable stack flag set.

That leads to AVC denial

avc:  denied  { execstack } for  pid=25972 comm="java" scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=process

when trying to start tomcat5 (as part of Spacewalk server).

However, when I clear the execstack, tomcat5 seems to start and run just fine. So my assumption is that it is actually not needed, generally.

Version-Release number of selected component (if applicable):

# rpm -qf /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so
java-1.6.0-openjdk-1.6.0.0-33.b16.fc12.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. run execstack -q /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so
2. Run service tomcat5 start with Enforcing SELinux.
  
Actual results:

# execstack -q /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so
X /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so

Fails, with

dl failure on line 696Error: failed /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so, because /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so: cannot enable executable stack as shared object requires: Permission denied

in catalina.out.

Expected results:

# execstack -q /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so
- /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so

and tomcat5 starting just fine.

Additional info:

Running

# execstack -c /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so
#

makes tomcat5 run fine but user should not need to do that ou their system.

Comment 1 Mark Wielaard 2009-11-30 09:38:33 UTC
This might have been fixed upstream by:
http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=be41014d9d9b

Is the patches/hotspot/default/icedtea-gcc-stack-markings.patch in the current rpm sources?

Comment 2 Martin Matejovic 2009-11-30 09:44:55 UTC
(In reply to comment #1)
> This might have been fixed upstream by:
> http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=be41014d9d9b
> 
> Is the patches/hotspot/default/icedtea-gcc-stack-markings.patch in the current
> rpm sources?  

No, it is not included in latest RPM, release 33.

Comment 3 Mark Wielaard 2010-01-23 22:52:24 UTC
*** Bug 540153 has been marked as a duplicate of this bug. ***

Comment 4 Jan Pazdziora (Red Hat) 2010-01-25 08:48:01 UTC
And while we are adding other bugs as duplicates to this one -- could we actually get new java built, so that the bug can be close and everyone is happy? Especially as upstream seems to have working patch?

Thank you,

Jan

Comment 5 Deepak Bhole 2010-01-25 18:41:23 UTC
Upstream is preparing to release 1.7 soon. Once it is out, it will be built into rawhide.

Re-assigning component owner to package builder.

Comment 6 Jan Pazdziora (Red Hat) 2010-01-26 08:37:56 UTC
Thank you. While I appreciate the fix in rawhide with 1.7, Fedora 12 has nine to ten more months of life ahead, and this issue prevents applications like tomcat to run properly with SELinux Enforcing. So I'd claim that it is a pretty serious issue, and warrants a respin of the java-1.6.0-openjdk package for Fedora 12.

Thank you for considering that.

Jan

Comment 7 Siddhesh Poyarekar 2010-01-31 05:08:19 UTC
This bug has been triaged

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 8 Dave Malcolm 2010-02-04 23:18:02 UTC
Whilst waiting for an update, am I right in thinking that the following can be used as a workaround?
  # setsebool allow_java_execstack 1

Comment 9 Jan Pazdziora (Red Hat) 2010-02-05 08:40:05 UTC
It probably can. However: why is it so hard to respin java package in the first place? Is there some kind of politics behind this?

Comment 10 Jan Pazdziora (Red Hat) 2010-02-05 08:42:06 UTC
(In reply to comment #7)
> This bug has been triaged

What does it mean in practical terms? When can we expect fixed package to be released?

Comment 11 Siddhesh Poyarekar 2010-02-05 10:10:14 UTC
It means that the bug report is complete and and actionable:

http://fedoraproject.org/wiki/BugZappers/BugStatusWorkFlow#Triaged

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 12 Fedora Update System 2010-03-13 17:51:20 UTC
java-1.6.0-openjdk-1.6.0.0-33.b17.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-33.b17.fc11

Comment 13 Fedora Update System 2010-03-13 17:53:37 UTC
java-1.6.0-openjdk-1.6.0.0-36.b17.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-36.b17.fc12

Comment 14 Fedora Update System 2010-03-15 09:29:04 UTC
java-1.6.0-openjdk-1.6.0.0-35.b17.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-35.b17.fc13

Comment 15 Jan Pazdziora (Red Hat) 2010-03-15 10:47:40 UTC
The released package fixes the issue on Fedora 12. This bugzilla can now be closed as resolved.

Comment 16 Jan Pazdziora (Red Hat) 2010-03-15 10:54:10 UTC
The released package fixes the issue on Fedora 12. This bugzilla can now be closed as resolved.

Comment 17 Fedora Update System 2010-03-16 00:40:46 UTC
java-1.6.0-openjdk-1.6.0.0-33.b17.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2010-03-16 00:44:54 UTC
java-1.6.0-openjdk-1.6.0.0-36.b17.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2010-03-23 23:27:32 UTC
java-1.6.0-openjdk-1.6.0.0-35.b17.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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