Bug 2103487 - SELinux is preventing install from using the 'fsetid' capabilities.
Summary: SELinux is preventing install from using the 'fsetid' capabilities.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 36
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5b4a38bbd0f2e490d22b3cccb07...
: 2103490 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-03 18:07 UTC by Tony
Modified: 2022-08-20 01:44 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-36.14-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-20 01:44:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1318 0 None open Openvswitch updates 2022-08-08 15:41:12 UTC

Internal Links: 1988164

Description Tony 2022-07-03 18:07:09 UTC
Description of problem:
SELinux is preventing install from using the 'fsetid' capabilities.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that install should have the fsetid capability 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:
# ausearch -c 'install' --raw | audit2allow -M my-install
# semodule -X 300 -i my-install.pp

Additional Information:
Source Context                system_u:system_r:openvswitch_t:s0
Target Context                system_u:system_r:openvswitch_t:s0
Target Objects                Unknown [ capability ]
Source                        install
Source Path                   install
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-36.10-1.fc36.noarch
Local Policy RPM              selinux-policy-targeted-36.10-1.fc36.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.18.7-200.fc36.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Sat Jun 25 20:06:14 UTC 2022
                              x86_64 x86_64
Alert Count                   12
First Seen                    2022-06-21 16:51:02 EDT
Last Seen                     2022-07-03 11:38:53 EDT
Local ID                      224cd040-3844-47cd-9d91-34cd13382656

Raw Audit Messages
type=AVC msg=audit(1656862733.779:216): avc:  denied  { fsetid } for  pid=1360 comm="install" capability=4  scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:system_r:openvswitch_t:s0 tclass=capability permissive=0


Hash: install,openvswitch_t,openvswitch_t,capability,fsetid

Version-Release number of selected component:
selinux-policy-targeted-36.10-1.fc36.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.17.1
hashmarkername: setroubleshoot
kernel:         5.18.7-200.fc36.x86_64
type:           libreport

Potential duplicate: bug 1956109

Comment 1 Zdenek Pytela 2022-07-26 17:01:03 UTC
Tony,

Do you know when this denial appears and if it is the /bin/install command which is executed?

Comment 2 Tony 2022-08-01 15:08:08 UTC
Unforrtunately, the report details don't sepcify the full path:

Source                        install
Source Path                   install

I'm not sure how I can determine from where the command is being invoked but will try your suggestions if you have any.

Comment 3 Zdenek Pytela 2022-08-02 08:38:54 UTC
Full auditing can be enabled following these steps:

1) Open the /etc/audit/rules.d/audit.rules file in an editor.
2) Remove the following line if it exists:
-a task,never
3) Add the following line to the end of the file:
-w /etc/shadow -p w
4) Restart the audit daemon:
  # service auditd restart
5) Re-run your scenario.
6) Collect AVC denials:
  # ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today

It will display additional information, but not necessary the command path. So do you know at which moment or action the denial appears? Is it a result of some configuration change?

Comment 4 Tony 2022-08-06 17:47:56 UTC
This happens at boot time, just after openvswitch is started:
Aug 06 13:30:10 fedora chown[1407]: /usr/bin/chown: cannot access '/run/openvswitch': No such file or directory
Aug 06 13:30:10 fedora audit[1458]: AVC avc:  denied  { fsetid } for  pid=1458 comm="install" capability=4  scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:system_r:openvswitch_t:s0 tclass=capability permissive=0
Aug 06 13:30:10 fedora audit[1458]: AVC avc:  denied  { fsetid } for  pid=1458 comm="install" capability=4  scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:system_r:openvswitch_t:s0 tclass=capability permissive=0
Aug 06 13:30:10 fedora ovs-vsctl[1467]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=2.17.0 "external-ids:system-id=\"4fb11813-ac13-44f3-84eb-aac88ba8507c\"" "external-ids:rundir=\"/var/run/openvswitch\"" "system-type=\"fedora\"" "system-version=\"36\""
Aug 06 13:30:10 fedora audit[1527]: AVC avc:  denied  { search } for  pid=1527 comm="modprobe" name="events" dev="tracefs" ino=60 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:tracefs_t:s0 tclass=dir permissive=0
Aug 06 13:30:10 fedora audit[1527]: AVC avc:  denied  { search } for  pid=1527 comm="modprobe" name="events" dev="tracefs" ino=60 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:object_r:tracefs_t:s0 tclass=dir permissive=0
Aug 06 13:30:10 fedora kernel: Failed to create system directory openvswitch
Aug 06 13:30:10 fedora kernel: Failed to create system directory openvswitch
Aug 06 13:30:10 fedora ovs-ctl[1520]: Inserting openvswitch module [  OK  ]
Aug 06 13:30:10 fedora kernel: openvswitch: Open vSwitch switching datapath
Aug 06 13:30:11 fedora systemd[1]: Starting openvswitch.service - Open vSwitch...
Aug 06 13:30:11 fedora systemd[1]: Finished openvswitch.service - Open vSwitch.
Aug 06 13:30:11 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=openvswitch comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 06 13:30:13 fedora setroubleshoot[1609]: SELinux is preventing install from using the fsetid capability. For complete SELinux messages run: sealert -l 30194936-b2dd-4013-bd06-a546143a43e7
Aug 06 13:30:13 fedora setroubleshoot[1609]: SELinux is preventing install from using the fsetid capability.
Aug 06 13:30:13 fedora setroubleshoot[1609]: SELinux is preventing install from using the fsetid capability. For complete SELinux messages run: sealert -l 30194936-b2dd-4013-bd06-a546143a43e7
Aug 06 13:30:13 fedora setroubleshoot[1609]: SELinux is preventing install from using the fsetid capability.
[tony@chainsaw ~]$

Comment 5 Zdenek Pytela 2022-08-08 15:50:34 UTC
*** Bug 2103490 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2022-08-12 07:56:14 UTC
FEDORA-2022-70c63dd1e2 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-70c63dd1e2

Comment 7 Fedora Update System 2022-08-13 01:09:26 UTC
FEDORA-2022-70c63dd1e2 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-70c63dd1e2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-70c63dd1e2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-08-20 01:44:36 UTC
FEDORA-2022-70c63dd1e2 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


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