Bug 1123321

Summary: SELinux is preventing /usr/sbin/cryptsetup from write access on the socket Unknown.
Product: [Fedora] Fedora Reporter: Ritesh Khadgaray <khadgaray>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-25 11:22:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ritesh Khadgaray 2014-07-25 10:14:28 UTC
Description of problem:
saw this in my logs


SELinux is preventing /usr/sbin/cryptsetup from write access on the socket Unknown.

*****  Plugin file (47.5 confidence) suggests   ******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin file (47.5 confidence) suggests   ******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin catchall (6.38 confidence) suggests   **************************

If you believe that cryptsetup should be allowed write access on the Unknown socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep cryptsetup /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:lvm_t:s0
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                Unknown [ socket ]
Source                        cryptsetup
Source Path                   /usr/sbin/cryptsetup
Port                          <Unknown>
Host                          x230t.local
Source RPM Packages           cryptsetup-1.6.5-2.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-64.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     x230t.local
Platform                      Linux x230t.local 3.16.0-0.rc5.git1.1.fc21.x86_64
                              #1 SMP Wed Jul 16 18:48:51 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-07-11 19:18:04 IST
Last Seen                     2014-07-25 15:30:57 IST
Local ID                      ff738d3c-376e-40dd-a5bb-9c036eaa53ef

Raw Audit Messages
type=AVC msg=audit(1406282457.528:707): avc:  denied  { write } for  pid=26602 comm="cryptsetup" scontext=system_u:system_r:lvm_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1


type=SYSCALL msg=audit(1406282457.528:707): arch=x86_64 syscall=sendmsg success=yes exit=512 a0=7 a1=7fff063dc600 a2=0 a3=5db items=0 ppid=1550 pid=26602 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=cryptsetup exe=/usr/sbin/cryptsetup subj=system_u:system_r:lvm_t:s0 key=(null)

Hash: cryptsetup,lvm_t,unlabeled_t,socket,write

Comment 1 Lukas Vrabec 🐦 2014-07-25 11:22:28 UTC
Hi, 
Follow these steps to fix your issue.

*****  Plugin file (47.5 confidence) suggests   ******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

Comment 2 Lukas Vrabec 🐦 2014-07-25 11:22:44 UTC
*** Bug 1123322 has been marked as a duplicate of this bug. ***