Bug 184394 - policy-targeted does not allow loop-mounting
policy-targeted does not allow loop-mounting
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Depends On:
Blocks: FC5Blocker
  Show dependency treegraph
Reported: 2006-03-08 10:07 EST by Konstantin Ryabitsev
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-08 16:08:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Konstantin Ryabitsev 2006-03-08 10:07:31 EST
Description of problem:
Loop-mounting is impossible with selinux-policy-targeted in enforcing mode.

[root@purush ~]# losetup /dev/loop0 file.ext3
file.ext3: Permission denied

type=AVC msg=audit(1141835384.388:13): avc:  denied  { read write } for 
pid=1807 comm="losetup" name="file.ext3" dev=sda1 ino=752212
tcontext=root:object_r:user_home_t:s0 tclass=file
type=SYSCALL msg=audit(1141835384.388:13): arch=40000003 syscall=5 success=no
exit=-13 a0=bfefbcae a1=8002 a2=0 a3=8002 items=1 pid=1807 auid=0 uid=0 gid=0
euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 comm="losetup" exe="/sbin/losetup"
type=CWD msg=audit(1141835384.388:13):  cwd="/root"
type=PATH msg=audit(1141835384.388:13): item=0 name="file.ext3" flags=101 
inode=752212 dev=08:01 mode=0100644 ouid=0 ogid=0 rdev=00:00

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

How reproducible:
Every time

Steps to Reproduce:
1. dd if=/dev/zero of=file.ext3 bs=1M count=32
2. losetup /dev/loop0 file.ext3


1. mount -o loop boot.iso /mnt/tmp
Actual results:
Permission denied

Expected results:
Loop-mounting should be allowed.
Comment 1 Warren Togami 2006-03-08 10:15:44 EST
Hmm... confirmed broken in yesterday's rawhide.
Comment 2 Warren Togami 2006-03-08 10:34:01 EST
Attempt above losetup command:
audit(1141831550.671:130): avc:  denied  { read write } for  pid=21571
comm="losetup" name="file.ext3" dev=dm-0 ino=3993807
tcontext=root:object_r:user_home_t:s0 tclass=file

Attempt loopback mount of boot.iso:
audit(1141832440.887:131): avc:  denied  { read write } for  pid=21682
comm="mount" name="boot.iso" dev=dm-0 ino=9722598
scontext=root:system_r:mount_t:s0-s0:c0.c255 tcontext=root:object_r:tmp_t:s0
Comment 3 Warren Togami 2006-03-08 16:08:47 EST
Confirmed fixed in selinux-policy-2.2.23-8
Comment 4 Konstantin Ryabitsev 2006-03-09 21:18:02 EST
Works great! You guys rock. :)

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