Bug 184394 - policy-targeted does not allow loop-mounting
Summary: policy-targeted does not allow loop-mounting
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC5Blocker
TreeView+ depends on / blocked
 
Reported: 2006-03-08 15:07 UTC by Konstantin Ryabitsev
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-08 21:08:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Konstantin Ryabitsev 2006-03-08 15:07:31 UTC
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

audit.log:
type=AVC msg=audit(1141835384.388:13): avc:  denied  { read write } for 
pid=1807 comm="losetup" name="file.ext3" dev=sda1 ino=752212
scontext=root:system_r:fsadm_t:s0-s0:c0.c255
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):
selinux-policy-targeted-2.2.23-6

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

or

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 15:15:44 UTC
Hmm... confirmed broken in yesterday's rawhide.


Comment 2 Warren Togami 2006-03-08 15:34:01 UTC
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
scontext=root:system_r:fsadm_t:s0-s0:c0.c255
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
tclass=file


Comment 3 Warren Togami 2006-03-08 21:08:47 UTC
Confirmed fixed in selinux-policy-2.2.23-8

Comment 4 Konstantin Ryabitsev 2006-03-10 02:18:02 UTC
Works great! You guys rock. :)


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