RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1247880 - [Hyper-V][RHEL 7.2] selinux preventing VSS live backup if there is home partition
Summary: [Hyper-V][RHEL 7.2] selinux preventing VSS live backup if there is home part...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: All
OS: Windows
high
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 1229888
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-29 07:21 UTC by ldu
Modified: 2015-11-19 10:42 UTC (History)
16 users (show)

Fixed In Version: selinux-policy-3.13.1-60.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1229888
Environment:
Last Closed: 2015-11-19 10:42:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
guest backup fail message. (75.92 KB, image/png)
2015-07-29 07:31 UTC, ldu
no flags Details
tht host backup fail info (18.14 KB, image/png)
2015-07-29 07:32 UTC, ldu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2300 0 normal SHIPPED_LIVE selinux-policy bug fix update 2015-11-19 09:55:26 UTC

Comment 1 ldu 2015-07-29 07:30:07 UTC
This bug reproduce on RHEL7.2 guest, the test ENV info:
The bug related host version:Hyper-V 2012 R2

The bug related guest version:rhel7 3.10.0-295.el7.x86_64
you can find the log message from the  attachment guest_backup_fail.png and host_backupfail_info.png.

Comment 2 ldu 2015-07-29 07:31:38 UTC
Created attachment 1057222 [details]
guest backup fail message.

Comment 3 ldu 2015-07-29 07:32:22 UTC
Created attachment 1057223 [details]
tht host backup fail info

Comment 4 Miroslav Grepl 2015-07-29 07:54:47 UTC
Could you attach AVCs related to RHEL-7.2?

Thank you.

Comment 5 ldu 2015-07-29 08:42:11 UTC
(In reply to Miroslav Grepl from comment #4)
> Could you attach AVCs related to RHEL-7.2?
> 
> Thank you.

The AVC log as below:

time->Wed Jul 29 16:20:31 2015
type=SYSCALL msg=audit(1438158031.808:354): arch=c000003e syscall=83 success=no exit=-13 a0=7f3b38fba86f a1=1c0 a2=180 a3=8 items=0 ppid=1939 pid=2908 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ebtables" exe="/usr/sbin/ebtables" subj=system_u:system_r:iptables_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1438158031.808:354): avc:  denied  { write } for  pid=2908 comm="ebtables" name="lib" dev="dm-0" ino=134320326 scontext=system_u:system_r:iptables_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir
----
time->Wed Jul 29 16:38:20 2015
type=SYSCALL msg=audit(1438159100.673:397): arch=c000003e syscall=2 success=no exit=-13 a0=7f38dbf49266 a1=0 a2=0 a3=1e items=0 ppid=1 pid=1283 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="hypervvssd" exe="/usr/sbin/hypervvssd" subj=system_u:system_r:hypervvssd_t:s0 key=(null)
type=AVC msg=audit(1438159100.673:397): avc:  denied  { read } for  pid=1283 comm="hypervvssd" name="/" dev="dm-2" ino=192 scontext=system_u:system_r:hypervvssd_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir
----
time->Wed Jul 29 16:38:20 2015
type=SYSCALL msg=audit(1438159100.673:398): arch=c000003e syscall=2 success=no exit=-13 a0=7f38dbf49266 a1=0 a2=0 a3=1e items=0 ppid=1 pid=1283 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="hypervvssd" exe="/usr/sbin/hypervvssd" subj=system_u:system_r:hypervvssd_t:s0 key=(null)
type=AVC msg=audit(1438159100.673:398): avc:  denied  { read } for  pid=1283 comm="hypervvssd" name="/" dev="dm-2" ino=192 scontext=system_u

Comment 6 Miroslav Grepl 2015-07-29 10:55:29 UTC
What does

rpm -q selinux-policy-targeted

Comment 7 ldu 2015-07-30 06:54:34 UTC
(In reply to Miroslav Grepl from comment #6)
> What does
> 
> rpm -q selinux-policy-targeted

[root@vm-106-138 ~]# rpm -q selinux-policy-targeted 
selinux-policy-targeted-3.13.1-33.el7.noarch

Comment 8 Miroslav Grepl 2015-08-05 07:27:46 UTC
And what does

# ls -dZ /var/lib/ebtables

# matchpathcon /var/lib/ebtables

Comment 9 ldu 2015-08-05 08:28:41 UTC
(In reply to Miroslav Grepl from comment #8)
> And what does
> 
> # ls -dZ /var/lib/ebtables
> 
> # matchpathcon /var/lib/ebtables

Hi Grepl,

In my test guest, there is no ebtales.

[root@vm-106-138 ~]# ls -dZ /var/lib/ebtables
ls: cannot access /var/lib/ebtables: No such file or directory

Comment 10 Milos Malik 2015-08-05 08:32:03 UTC
When the machine is in enforcing mode, then the /var/lib/ebtables directory is not created at all.

Comment 11 Miroslav Grepl 2015-08-05 09:38:18 UTC
Then we need to allow it. Is it created by eptables running under iptables_t.

Comment 13 Lukas Vrabec 2015-08-21 08:35:43 UTC

*** This bug has been marked as a duplicate of bug 1246097 ***

Comment 14 Milos Malik 2015-10-07 11:44:57 UTC
This bug is NOT a duplicate of BZ#1246097. We need to address the AVCs from comment#0.

Comment 15 Milos Malik 2015-10-07 11:46:45 UTC
We need following rule in policy:

allow hypervvssd_t home_root_t : dir { read }

Comment 16 Milos Malik 2015-10-07 11:49:16 UTC
and this too:

allow hypervvssd_t binfmt_misc_fs_t : dir { read }

Comment 17 Miroslav Grepl 2015-10-13 06:16:49 UTC
Is this a blocker for 7.2?

Comment 18 ldu 2015-10-13 06:49:30 UTC
(In reply to Miroslav Grepl from comment #17)
> Is this a blocker for 7.2?

I think this bug is blocker issue, if the SElinux enable, the backup function can not be used.

Comment 19 Miroslav Grepl 2015-10-13 06:58:12 UTC
And does it work with a local policy?

Idu,
could you please test it with

$ cat mypol.te
policy_module(mypol,1.0)

require{
 type hypervvssd_t;
}

files_list_all_mountpoints(hypervvssd_t)


and run

# make -f /usr/share/selinux/devel/Makefile mypol.pp
# semodule -i mypol.p

and re-test it. Thank you.

Comment 22 ldu 2015-10-15 00:53:36 UTC
(In reply to Miroslav Grepl from comment #19)
> And does it work with a local policy?
> 
> Idu,
> could you please test it with
> 
> $ cat mypol.te
> policy_module(mypol,1.0)
> 
> require{
>  type hypervvssd_t;
> }
> 
> files_list_all_mountpoints(hypervvssd_t)
> 
> 
> and run
> 
> # make -f /usr/share/selinux/devel/Makefile mypol.pp
> # semodule -i mypol.p
> 
> and re-test it. Thank you.

Sorry for later to reply, I had re-test it with the policy, the  backup can works well, this policy could fix this issue.

Comment 25 errata-xmlrpc 2015-11-19 10:42:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2300.html


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