Bug 607383 - perf generated .debug caused selinux errors
perf generated .debug caused selinux errors
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
medium Severity high
: rc
: ---
Assigned To: Jiri Olsa
Michael Petlan
: RHELNAK
Depends On: 629274
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-23 20:32 EDT by CAI Qian
Modified: 2016-02-10 06:03 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-05 05:41:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description CAI Qian 2010-06-23 20:32:40 EDT
Description of problem:
After upgraded selinux-policy-targeted-3.7.19-25.el6.noarch to 3.7.19-27.el6, the system failed to boot without disable selinux.

Starting udev: /sbin/restorecon: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory
[  OK  ]
Setting hostname localhost.localdomain:  [FAILED]
Setting up Logical Volume Management:   2 logical volume(s) in volume group "VolGroup" now active
[  OK  ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -a /dev/mapper/VolGroup-lv_root 
/dev/mapper/VolGroup-lv_root: clean, 46673/363600 files, 1296657/1452032 blocks
[/sbin/fsck.ext4 (1) -- /boot] fsck.ext4 -a /dev/vda1 
/dev/vda1: recovering journal
/dev/vda1: clean, 52/128016 files, 100525/512000 blocks
[  OK  ]
Remounting root filesystem in read-write mode:  mount: error while loading shared libraries: libselinux.so.1: failed to map segment from shared object: Permission denied
[FAILED]
mount: error while loading shared libraries: libselinux.so.1: failed to map segment from shared object: Permission denied
Mounting local filesystems:  mount: error while loading shared libraries: libselinux.so.1: failed to map segment from shared object: Permission denied
[FAILED]

Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-27.el6.noarch.rpm 
selinux-policy-targeted-3.7.19-27.el6.noarch.rpm

How reproducible:
always
Comment 1 Miroslav Grepl 2010-06-24 06:08:01 EDT
Could you try to edit /etc/selinux/config and change the field

SELINUX=enforcing

to

SELINUX=permissive

After that execute:

# touch /.autorelabel; reboot
Comment 2 CAI Qian 2010-06-24 06:17:14 EDT
Disable SELinux is working fine. After the relabelling and enable SELinux, the problem happened again.
Comment 3 Milos Malik 2010-06-24 06:22:47 EDT
Do you use targeted policy or something else?

# cat /etc/selinux/config | grep ^SELINUXTYPE
SELINUXTYPE=targeted
Comment 4 CAI Qian 2010-06-24 06:30:35 EDT
Yes, targeted.
Comment 5 CAI Qian 2010-06-24 06:31:33 EDT
BTW, I was using the latest nightly tree - kernel-2.6.32-37.el6.
Comment 6 Miroslav Grepl 2010-06-24 09:15:06 EDT
(In reply to comment #2)
> Disable SELinux is working fine. After the relabelling and enable SELinux, the
> problem happened again.    

Are you sure you used 

SELINUX=permissive

in the /etc/selinux/config file. 

You should be able boot in permissive mode. It looks like you have a labeling problem.
Comment 7 CAI Qian 2010-06-24 10:19:25 EDT
I used selinux=0 to the kernel command-line to disable it.
Comment 8 CAI Qian 2010-06-24 10:30:19 EDT
(In reply to comment #1)
> Could you try to edit /etc/selinux/config and change the field
> 
> SELINUX=enforcing
> 
> to
> 
> SELINUX=permissive
> 
> After that execute:
> 
> # touch /.autorelabel; reboot    

*** Relabeling could take a very long time, depending on file
*** system size and speed of hard drives.
*******filespec_add:  conflicting specifications for /root/.debug/lib/modules/2.6.32-37.el6.x86_64/kernel/fs/jbd2/jbd2.ko/c2c9b116c4c0441329daff5ed496e6138b4ec682 and /lib/modules/2.6.32-37.el6.x86_64/kernel/fs/jbd2/jbd2.ko, using system_u:object_r:modules_object_t:s0.
filespec_add:  conflicting specifications for /root/.debug/lib/modules/2.6.32-37.el6.x86_64/kernel/fs/ext4/ext4.ko/39265cc81ffea2f1d5ac74cf08e8b54b00c459e9 and /lib/modules/2.6.32-37.el6.x86_64/kernel/fs/ext4/ext4.ko, using system_u:object_r:modules_object_t:s0.
filespec_add:  conflicting specifications for /root/.debug/bin/ls/ccb2db14bd00cf1784191c717a163679b4b043d9 and /bin/ls, using system_u:object_r:bin_t:s0.
filespec_add:  conflicting specifications for /lib64/libc-2.12.so and /root/.debug/lib64/libc-2.12.so/f68774185f4068ddde5ac462201047c45e08d584, using system_u:object_r:admin_home_t:s0.
filespec_add:  conflicting specifications for /lib64/libattr.so.1.1.0 and /root/.debug/lib64/libattr.so.1.1.0/f00502ce2f379fdba8a8ad78737bfaa8083fee9c, using system_u:object_r:admin_home_t:s0.
filespec_add:  conflicting specifications for /lib64/librt-2.12.so and /root/.debug/lib64/librt-2.12.so/f05b84120ec6b2df87faf999c30acae8f7d1d7d5, using system_u:object_r:admin_home_t:s0.
filespec_add:  conflicting specifications for /lib64/libcap.so.2.16 and /root/.debug/lib64/libcap.so.2.16/43d6fae9068d4448ddd916f9e077ce7c1e0941dd, using system_u:object_r:admin_home_t:s0.
filespec_add:  conflicting specifications for /lib64/libselinux.so.1 and /root/.debug/lib64/libselinux.so.1/529d16e4bb6170f1b5b1bfec2510f2404c84e510, using system_u:object_r:admin_home_t:s0.
*filespec_add:  conflicting specifications for /lib64/libpthread-2.12.so and /root/.debug/lib64/libpthread-2.12.so/5b0fbd0898083f2296235b936ef18c4162c5d573, using system_u:object_r:admin_home_t:s0.
filespec_add:  conflicting specifications for /lib64/ld-2.12.so and /root/.debug/lib64/ld-2.12.so/d7f2c54fc9c4784e059344d3df91646df2a7aadc, using system_u:object_r:admin_home_t:s0.
filespec_add:  conflicting specifications for /lib64/libdl-2.12.so and /root/.debug/lib64/libdl-2.12.so/de4a3e2d01d962dc77ad0a52c300ffe2ff70dd7a, using system_u:object_r:admin_home_t:s0.
********************filespec_add:  conflicting specifications for /usr/libexec/perf.2.6.32-37.el6.x86_64 and /root/.debug/usr/libexec/perf.2.6.32-37.el6.x86_64/cd082a07419539eb526318b6240fbb3d6afa96ae, using system_u:object_r:admin_home_t:s0.
**************************
Unmounting file systems
Comment 9 Miroslav Grepl 2010-06-25 03:08:51 EDT
Ok, now it is clear. Looks like files in the /root/.debug/ are hard links and it causes these issues with labeling. But I am not sure where it comes from.
Comment 10 Daniel Walsh 2010-06-25 14:07:33 EDT
I think this is a config problem.
Comment 11 CAI Qian 2010-06-26 03:30:58 EDT
Well, this was a rhel6 system that just try to upgrade to the latest level. The problem occurred after upgraded to this policy level.
Comment 12 CAI Qian 2010-06-27 12:48:34 EDT
Don't know where were those /root/.debug files came from. I just downgraded the packages to -25.el6 level, and problems were still there.
Comment 13 RHEL Product and Program Management 2010-06-27 13:02:54 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 14 CAI Qian 2010-06-27 13:17:49 EDT
OK, those /root/.debug file was generated by perf command.
Comment 15 CAI Qian 2010-06-27 13:28:08 EDT
version: perf-2.6.32-37.el6
Comment 18 RHEL Product and Program Management 2010-07-29 01:27:49 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 19 RHEL Product and Program Management 2010-08-18 17:31:58 EDT
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.
Comment 22 Jiri Olsa 2011-01-05 05:41:46 EST
I talked to Miroslav Grepl and the issue is fixed in the
newest selinux-policy package

I retested with the new package and it works:

[root@hp-xw9300-02 ~]# rpm -qa | grep selinux
libselinux-2.0.94-2.el6.x86_64
selinux-policy-3.7.19-62.el6.noarch
selinux-policy-targeted-3.7.19-62.el6.noarch
libselinux-utils-2.0.94-2.el6.x86_64
[root@hp-xw9300-02 ~]# find .debug/
.debug/
.debug/lib64
.debug/lib64/libdl-2.12.so
.debug/lib64/libdl-2.12.so/d3749fef42a35dd89ffed18d7ff42069822eee1d
.debug/lib64/libpthread-2.12.so
.debug/lib64/libpthread-2.12.so/4038d2a5fc9f0ef8a1b268ccbdce4072ec745919
.debug/bin
.debug/bin/ls
.debug/bin/ls/ccb2db14bd00cf1784191c717a163679b4b043d9
.debug/bin/cat
.debug/bin/cat/f0cf8d0ac31e00eccf30195d6a15c6a131ef2e4f
.debug/.build-id
.debug/.build-id/cc
.debug/.build-id/cc/b2db14bd00cf1784191c717a163679b4b043d9
.debug/.build-id/f0
.debug/.build-id/f0/cf8d0ac31e00eccf30195d6a15c6a131ef2e4f
.debug/.build-id/40
.debug/.build-id/40/38d2a5fc9f0ef8a1b268ccbdce4072ec745919
.debug/.build-id/d3
.debug/.build-id/d3/749fef42a35dd89ffed18d7ff42069822eee1d
[root@hp-xw9300-02 ~]# touch /.autorelabel
[root@hp-xw9300-02 ~]# reboot

system came up and relabeled with no problem..

closing

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