Bug 689736 - MLS in single-user mode: /var/lock/lvm: setfscreatecon failed: Permission denied
MLS in single-user mode: /var/lock/lvm: setfscreatecon failed: Permission denied
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.7
All Linux
medium Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On: 680388
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-22 06:18 EDT by Milos Malik
Modified: 2012-10-16 04:13 EDT (History)
1 user (show)

See Also:
Fixed In Version: selinux-policy-2.4.6-304.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 680388
Environment:
Last Closed: 2011-07-21 05:19:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2011-03-22 06:18:32 EDT
Description of problem:


Version-Release number of selected component (if applicable):
lvm2-2.02.84-1.el5
selinux-policy-2.4.6-302.el5
selinux-policy-devel-2.4.6-302.el5
selinux-policy-minimum-2.4.6-302.el5
selinux-policy-mls-2.4.6-302.el5
selinux-policy-strict-2.4.6-302.el5
selinux-policy-targeted-2.4.6-302.el5

How reproducible:
always

Steps to Reproduce:
1. install MLS policy on a RHEL-5 machine
2. modify /etc/selinux/config so that the machine will start up with MLS policy in permissive mode
3. modify /boot/grub/grub.conf so that the machine will start up into single-user mode
4. run 'touch /.autorelabel'
5. run 'reboot'
6. log in as root via console
7. run 'reboot' and search for 'type=' messages in the console
  
Actual results:
type=1400 audit(1300788795.499:3): avc:  denied  { setfscreate } for  pid=1395 comm="lvm.static" scontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tcontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tclass=process
type=1400 audit(1300788795.516:4): avc:  denied  { setfscreate } for  pid=1395 comm="lvm.static" scontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tcontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tclass=process

Expected results:
no AVCs
Comment 1 Milos Malik 2011-03-22 06:22:04 EDT
Relevant part of the boot-up messages seen in console:

failed to stat() /dev/mapper/no
failed to stat() /dev/mapper/block
failed to stat() /dev/mapper/devices
failed to stat() /dev/mapper/found
Setting up Logical Volume Management:   /var/lock/lvm: setfscreatecon failed: Permission denied
  (null): setfscreatecon failed: Permission denied
  No volume groups found
[  OK  ]
Checking filesystems
Checking all file systems.
Comment 2 Milos Malik 2011-03-22 06:29:23 EDT
The same AVCs but printed by ausearch:
----
time->Tue Mar 22 06:25:07 2011
type=SYSCALL msg=audit(1300789507.470:14): arch=c0000032 syscall=1027 success=no exit=-13 a0=3 a1=6000000000bc3800 a2=20 a3=c00000000000038b items=0 ppid=2462 pid=2463 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="vgs" exe="/usr/sbin/lvm" subj=system_u:system_r:lvm_t:s0-s15:c0.c1023 key=(null)
type=AVC msg=audit(1300789507.470:14): avc:  denied  { setfscreate } for  pid=2463 comm="vgs" scontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tcontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tclass=process
----
time->Tue Mar 22 06:25:07 2011
type=SYSCALL msg=audit(1300789507.471:15): arch=c0000032 syscall=1027 success=no exit=-13 a0=3 a1=0 a2=0 a3=c00000000000038b items=0 ppid=2462 pid=2463 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="vgs" exe="/usr/sbin/lvm" subj=system_u:system_r:lvm_t:s0-s15:c0.c1023 key=(null)
type=AVC msg=audit(1300789507.471:15): avc:  denied  { setfscreate } for  pid=2463 comm="vgs" scontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tcontext=system_u:system_r:lvm_t:s0-s15:c0.c1023 tclass=process
----
Comment 3 Miroslav Grepl 2011-03-29 04:19:24 EDT
I will backport from RHEL6.
Comment 5 Miroslav Grepl 2011-04-05 10:38:53 EDT
Fixed in selinux-policy-2.4.6-304.el5
Comment 8 errata-xmlrpc 2011-07-21 05:19:50 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1069.html
Comment 9 errata-xmlrpc 2011-07-21 07:56:10 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1069.html

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