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 1660798 - NFSv4.2: security label of mount point shows as "unlabeled_t" for ~30 seconds after mounting
Summary: NFSv4.2: security label of mount point shows as "unlabeled_t" for ~30 seconds...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: kernel
Version: ---
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 8.3
Assignee: Scott Mayhew
QA Contact: Zhi Li
URL:
Whiteboard:
: 1652463 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-19 09:33 UTC by Renaud Métrich
Modified: 2020-11-04 21:15 UTC (History)
10 users (show)

Fixed In Version: kernel-4.18.0-221.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1625955
Environment:
Last Closed: 2020-11-04 00:51:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
RHEL-specific patch (6.38 KB, patch)
2020-03-13 20:13 UTC, Scott Mayhew
no flags Details | Diff

Description Renaud Métrich 2018-12-19 09:33:58 UTC
+++ This bug was initially created as a clone of Bug #1625955 +++

Description of problem:

This BZ may be related to BZ 1624848 (https://bugzilla.redhat.com/show_bug.cgi?id=1624848) but I'm not sure.

When mounting a directory using v4.2 and exported with security labels AND when the exported directory is just below "/", the security label seen on the client shows as "unlabeled_t" for about 30 seconds.
After that delay, the label appears right.

Recording a tcpdump, it looks like the issue is on the client side.


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

nfs-utils-2.3.3-7.el8.x86_64


How reproducible:

Always


Steps to Reproduce:

1. Configure NFS server (vm-nfs8-server) to export some directory under /

  # mkdir -p /export

  # ls -Zd /export
  drwxr-xr-x. root root system_u:object_r:usr_t:s0       /export

  # cat /etc/exports
  /export *(rw,no_root_squash,no_wdelay,sync,security_label)

  # systemctl restart nfs-server

2. On the NFS client, mount the exported directory

  # yum -y install nfs-utils attr

  # mount -o vers=4.2 vm-nfs8-server:/export /mnt

3. Verify security labels quickly after mounting

  # date; getfattr --absolute-names -n security.selinux /mnt
  Wed Dec 19 10:27:33 CET 2018
  # file: /mnt
  security.selinux="system_u:object_r:unlabeled_t:s0"

4. Wait for 30 seconds or maybe a bit more and check again

  # date; getfattr --absolute-names -n security.selinux /mnt
  Wed Dec 19 10:29:03 CET 2018
  # file: /mnt
  security.selinux="system_u:object_r:usr_t:s0"

Comment 1 Zhi Li 2019-01-23 03:02:08 UTC
*** Bug 1652463 has been marked as a duplicate of this bug. ***

Comment 2 Ondrej Mosnacek 2020-02-26 15:25:13 UTC
There is nothing confidential in this BZ nor its description - opening it to the public.

Comment 3 Ondrej Mosnacek 2020-02-26 15:32:55 UTC
Also, this should be assigned to kernel, not nfs-utils...

Comment 4 Steve Whitehouse 2020-03-09 15:57:04 UTC
Again, some triage required

Comment 5 Stephen Smalley 2020-03-09 16:00:21 UTC
Upstream fix posted here: https://lore.kernel.org/selinux/20200303225837.1557210-1-smayhew@redhat.com/

Comment 7 Scott Mayhew 2020-03-13 19:57:29 UTC
This will either need to go on top of the mount api changes (bug 1801202) or we'll need a RHEL-specific patch.  For z-stream, we'll definitely need a RHEL-specific patch.

Comment 8 Scott Mayhew 2020-03-13 20:13:10 UTC
Created attachment 1669982 [details]
RHEL-specific patch

This patch is actually against upstream v5.5, but applies cleanly against RHEL 8.2.  If we wanted to use this patch, then there will be a few conflicts to fix when backporting the mount api changes.

Comment 9 Zhi Li 2020-03-16 05:05:15 UTC
(In reply to Scott Mayhew from comment #8)
> Created attachment 1669982 [details]
> RHEL-specific patch
> 
> This patch is actually against upstream v5.5, but applies cleanly against
> RHEL 8.2.  If we wanted to use this patch, then there will be a few
> conflicts to fix when backporting the mount api changes.

My understanding is that you tend to fix this issue based on the mount API changes (bug 1801202).

Comment 11 Frantisek Hrbata 2020-06-26 05:52:30 UTC
Patch(es) available on kernel-4.18.0-221.el8

Comment 17 Zhi Li 2020-06-28 05:53:04 UTC
Moving to VERIFIED according to comment#16.

Comment 20 errata-xmlrpc 2020-11-04 00:51:49 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 (Moderate: kernel security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2020:4431


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