Description of problem: rpm -q --verify SDL has problems and leaves stray files Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. make sure selinux is turned on 2. rpm -q --verify SDL 3. Actual results: [root@manager lib]# rpm -q --verify SDL prelink: /usr/lib/libSDL-1.2.so.0.7.2.#prelink#.vjRgbc Could not trace symbol resolving S.?...... /usr/lib/libSDL-1.2.so.0.7.2 dmesg shows: Jul 18 15:20:02 manager kernel: audit(1153228802.652:980): avc: denied { execheap } for pid=9876 comm="ld-linux.so.2" scontext=root:system_r:rpm_t:s0-s0:c0.c255 tcontext=root:system_r:rpm_t:s0-s0:c0.c255 tclass=process the temporary file stays in /usr/lib, cluttering up the directory for no good reason Expected results: everything should work fine Additional info: Not sure if this is a bug in SDL (text relocations ?), selinux policy, prelink, rpm, somewhere else. Similar problems with GL packages.
This is no SDL problem, assigning to prelink.
ping ? I'd really like to know what's wrong and how I can fix it.
I'm seeing the same thing with every lib that has selinux context textrel_shlib_t -rwxr-xr-x root root system_u:object_r:textrel_shlib_t libSDL-1.2.so.0.7.3 the temp file on the other hand has -rwx------ root root user_u:object_r:lib_t libSDL-1.2.so.0.7.3.#prelink#.fYwkkC Tobias
I've (hopefully) fixed the bug where prelink was leaving the temporary file behind in case of failure: svn diff -r150:151 svn://sources.redhat.com/svn/prelink/trunk/ Now the question is what to do with textrel_shlib_t's. One possibility is to change glibc, with LD_TRACE_PRELINKING=1 we never execute any code (except ld.so's own code), so there is no need to mprotect text sections back - nothing cares about it. So perhaps we could change dl-reloc.c to: /* Undo the segment protection changes. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK, 0) == 0) while (__builtin_expect (textrels != NULL, 0)) { if (__mprotect (textrels->start, textrels->len, textrels->prot) < 0) { errstring = N_("cannot restore segment prot after reloc"); goto call_error; } textrels = textrels->next; } Another alternative would be that prelink's verify code would look at SELinux type of the file and if it is textrel_shlib_t, set SELinux context of the temporary file. But hardcoding any particular type is very ugly and furthermore I'm afraid there can be multiple such types.
I'm OK with avoiding the mprotect call in ld.so.
>Another alternative would be that prelink's verify code would look at >SELinux type of the file and if it is textrel_shlib_t, set SELinux context of the >temporary file. But hardcoding any particular type is very ugly and furthermore >I'm afraid there can be multiple such types. You could getfilecon() setfscreatecon() create temporary file?
True, but is it really desirable to copy over SELinux context from the original file to the temporary? If somebody runs the temp file in the window between prelink --verify creates it and its deletion, it could have raised capabilities.
No I would prefer solution 1 also, but if we need solution two, then I would prefer to copy the file context rather then hard code textrel_shlib_t
Fedora apologizes that these issues have not been resolved yet. We're sorry it's taken so long for your bug to be properly triaged and acted on. We appreciate the time you took to report this issue and want to make sure no important bugs slip through the cracks. If you're currently running a version of Fedora Core between 1 and 6, please note that Fedora no longer maintains these releases. We strongly encourage you to upgrade to a current Fedora release. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained and closing them. http://fedoraproject.org/wiki/LifeCycle/EOL If this bug is still open against Fedora Core 1 through 6, thirty days from now, it will be closed 'WONTFIX'. If you can reporduce this bug in the latest Fedora version, please change to the respective version. If you are unable to do this, please add a comment to this bug requesting the change. Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we are following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again. And if you'd like to join the bug triage team to help make things better, check out http://fedoraproject.org/wiki/BugZappers
This bug is open for a Fedora version that is no longer maintained and will not be fixed by Fedora. Therefore we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen thus bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.