Description of problem: Happened during boot; it's worked fine for ages so it must be a recent package update. I've had iscsi setup for ages but rarely use it. SELinux is preventing iscsid from 'module_load' accesses on the system Unknown. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that iscsid should be allowed module_load access on the Unknown system 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 'iscsid' --raw | audit2allow -M my-iscsid # semodule -X 300 -i my-iscsid.pp Additional Information: Source Context system_u:system_r:iscsid_t:s0 Target Context system_u:system_r:iscsid_t:s0 Target Objects Unknown [ system ] Source iscsid Source Path iscsid Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.13.1-225.10.fc25.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.9.11-200.fc25.x86_64 #1 SMP Mon Feb 20 18:11:59 UTC 2017 x86_64 x86_64 Alert Count 6 First Seen 2017-03-01 09:02:39 GMT Last Seen 2017-03-01 09:03:08 GMT Local ID f05622fe-50b4-4a4b-9540-b2f32d25de17 Raw Audit Messages type=AVC msg=audit(1488358988.13:241): avc: denied { module_load } for pid=1090 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 Hash: iscsid,iscsid_t,iscsid_t,system,module_load Version-Release number of selected component: selinux-policy-3.13.1-225.10.fc25.noarch Additional info: reporter: libreport-2.8.0 hashmarkername: setroubleshoot kernel: 4.9.11-200.fc25.x86_64 type: libreport
I can confirm this as a regular user of iscsid. All was fine until selinux-policy-targeted-3.13.1-225.11.fc25.noarch was installed.
I can confirm this as well. AVC avc: denied { module_load } for pid=1146 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0
Same thing here, with identical message from sealert; I temporarily resorted to setting Selinux to 'permissive'.
Description of problem: Since I installed/configured iscsid I get this error whenerver I have a network connection. Additional info: reporter: libreport-2.8.0 hashmarkername: setroubleshoot kernel: 4.10.12-200.fc25.x86_64 type: libreport
Description of problem: Installed iscsi-initiator-utils Restarted the laptop. The following error was recorded in /var/log/audit/audit.log type=AVC msg=audit(1494381929.458:317): avc: denied { module_load } for pid=1 167 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:syste m_r:iscsid_t:s0 tclass=system permissive=0 type=AVC msg=audit(1494381929.486:318): avc: denied { module_load } for pid=1 167 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:syste m_r:iscsid_t:s0 tclass=system permissive=0 # ausearch -c 'iscsid' ---- time->Wed May 3 20:45:56 2017 type=AVC msg=audit(1493858756.477:122): avc: denied { module_load } for pid=1279 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 ---- Version-Release number of selected component: selinux-policy-3.13.1-225.13.fc25.noarch Additional info: reporter: libreport-2.8.0 hashmarkername: setroubleshoot kernel: 4.10.13-200.fc25.x86_64 type: libreport
selinux-policy-3.13.1-225.16.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9a20533d62
selinux-policy-3.13.1-225.16.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9a20533d62
selinux-policy-3.13.1-225.16.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Not working for me, even with latest selinux-policy (3.13.1-225.18): [cut] lug 13 11:39:25 helios systemd[1]: Starting Login and scanning of iSCSI devices... -- Subject: Unit iscsi.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit iscsi.service has begun starting up. lug 13 11:39:25 helios iscsi-mark-root-nodes[1705]: iscsiadm: No active sessions. lug 13 11:39:25 helios audit[1601]: AVC avc: denied { module_load } for pid=1601 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 lug 13 11:39:25 helios iscsiadm[1709]: iscsiadm: Could not login to [iface: default, target: iqn.2004-04.com.qnap:ts-419uii:iscsi.backape.cd056a, portal: 10.0.0.176,3260]. lug 13 11:39:25 helios iscsiadm[1709]: iscsiadm: initiator reported error (12 - iSCSI driver not found. Please make sure it is loaded, and retry the operation) lug 13 11:39:25 helios iscsiadm[1709]: iscsiadm: Could not log into all portals lug 13 11:39:25 helios iscsiadm[1709]: Logging in to [iface: default, target: iqn.2004-04.com.qnap:ts-419uii:iscsi.backape.cd056a, portal: 10.0.0.176,3260] (multiple) lug 13 11:39:25 helios systemd[1]: Started Login and scanning of iSCSI devices. -- Subject: Unit iscsi.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit iscsi.service has finished starting up. -- -- The start-up result is done. lug 13 11:39:25 helios audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=iscsi comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' lug 13 11:39:25 helios sudo[1702]: pam_unix(sudo:session): session closed for user root lug 13 11:39:25 helios audit[1702]: USER_END pid=1702 uid=0 auid=10027 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin lug 13 11:39:25 helios audit[1702]: CRED_DISP pid=1702 uid=0 auid=10027 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=succes lug 13 11:39:25 helios iscsid[1600]: Could not insert module tcp. Kmod error -13 [/cut] Still needs setting SELinux to 'permissive' to work...
I see this problem on rawhide (f27). Should the bug be reopened or new one created?
Still not working, on Fedora 25: [cut] SELinux is preventing iscsid from module_load access on the system Unknown. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that iscsid should be allowed module_load access on the Unknown system 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 'iscsid' --raw | audit2allow -M my-iscsid # semodule -X 300 -i my-iscsid.pp Additional Information: Source Context system_u:system_r:iscsid_t:s0 Target Context system_u:system_r:iscsid_t:s0 Target Objects Unknown [ system ] Source iscsid Source Path iscsid Port <Unknown> Host localhost Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.13.1-225.19.fc25.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name localhost.localdomain Platform Linux localhost.localdomain 4.11.12-200.fc25.x86_64 #1 SMP Fri Jul 21 16:41:43 UTC 2017 x86_64 x86_64 Alert Count 27 First Seen 2017-03-21 14:18:01 CET Last Seen 2017-08-22 11:51:48 CEST Local ID 3b1ede19-a617-48bb-a1a5-160b9257d636 Raw Audit Messages type=AVC msg=audit(1503395508.915:174): avc: denied { module_load } for pid=951 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 Hash: iscsid,iscsid_t,iscsid_t,system,module_load [/cut]
Why is iscsid loading a kernel module. This seems to be a dangerous thing to do. Allowing a process to load kernel modules, means they are basically unconfined, since they can load a kernel module that could stop SELinux from enforcing. Can't the loading of the module be done in the systemd unit file outside of the main process running the daemon?
Can the policy be limited to allow loading 'iscsi_tcp' and 'iscsi_ibft' modules only?
Sorry no.
Is there no other solution besides disabling SELinux or setting it to permissive?
Francesco, echo iscsi_tcp >> /etc/modules-load.d/iscsi.conf
(In reply to Tomasz Torcz from comment #16) > Francesco, > > echo iscsi_tcp >> /etc/modules-load.d/iscsi.conf Many thanks, it works for me.
This is still a problem as of Fedora 27. The default SELinux policies do not allow the iscsid process to load the modules needed which causes iscsi targets to be unavailable after rebooting a server. For example, the audit logs show failures as follows. type=AVC msg=audit(1515168544.778:228): avc: denied { map } for pid=1673 comm="iscsid" path="/usr/lib/modules/4.14.11-300.fc27.x86_64/modules.dep.bin" dev="md126" ino=805428070 scontext=system_u:system_r:iscsid_t:s0 tcontext=unconfined_u:object_r:modules_object_t:s0 tclass=file permissive=0 type=AVC msg=audit(1515168544.780:229): avc: denied { module_load } for pid=1673 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 I've verified that the workaround posted by Tomasz works. Would it be possible to update the iscsi-initiator-tools package to create this file by default?
Because of comment#18 moving to iscsi component.
(In reply to Michael Watters from comment #18) > This is still a problem as of Fedora 27. The default SELinux policies do > not allow the iscsid process to load the modules needed which causes iscsi > targets to be unavailable after rebooting a server. > > For example, the audit logs show failures as follows. > > type=AVC msg=audit(1515168544.778:228): avc: denied { map } for pid=1673 > comm="iscsid" > path="/usr/lib/modules/4.14.11-300.fc27.x86_64/modules.dep.bin" dev="md126" > ino=805428070 scontext=system_u:system_r:iscsid_t:s0 > tcontext=unconfined_u:object_r:modules_object_t:s0 tclass=file permissive=0 > type=AVC msg=audit(1515168544.780:229): avc: denied { module_load } for > pid=1673 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 > tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 > > I've verified that the workaround posted by Tomasz works. Would it be > possible to update the iscsi-initiator-tools package to create this file by > default? I can also confirm that this functionality still exists in FC27 with the latest set up updates. type=AVC msg=audit(1515537967.451:285): avc: denied { module_load } for pid=1572 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 type=AVC msg=audit(1515537967.575:296): avc: denied { map } for pid=1572 comm="iscsid" path="/usr/lib/modules/4.14.11-300.fc27.x86_64/modules.dep.bin" dev="dm-0" ino=134320577 scontext=system_u:system_r:iscsid_t:s0 tcontext=unconfined_u:object_r:modules_object_t:s0 tclass=file permissive=0 type=AVC msg=audit(1515537967.578:297): avc: denied { module_load } for pid=1572 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=0 type=AVC msg=audit(1515553952.671:351): avc: denied { module_load } for pid=1572 comm="iscsid" scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:system_r:iscsid_t:s0 tclass=system permissive=1 type=USER_AVC msg=audit(1515553965.574:359): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: received setenforce notice (enforcing=0) exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?
*** Bug 1471316 has been marked as a duplicate of this bug. ***
(In reply to Michael Watters from comment #18) > I've verified that the workaround posted by Tomasz works. Would it be > possible to update the iscsi-initiator-tools package to create this file by > default? There are a number of iSCSI transport driver modules that might be needed. Some are device independent (iscsi_tcp, iser), while others are PCI drivers (be2iscsi, qla4xxx, qedi), and some are device specific drivers that stack on an Ethernet driver without having it's own PCI function to match on (be2iscsi, cxgb3i, cxgb4i). We can't just load iscsi_tcp, as iscsid attempts to load the appropriate transport module when it's encountered in the configuration.
I'm seeing these symptoms on a brand new CentOS 7 install - iscsi refuses to survive a reboot unless selinux is disabled.
This bug is currently reported against a Fedora version which is already unsuported. I am changing the version to '27', the latest supported release. Please check whether this bug is still an issue on the '27' release. If you find this bug not being applicable on this release, please close it.
(In reply to Jan Kurik from comment #24) > This bug is currently reported against a Fedora version which is already > unsuported. > I am changing the version to '27', the latest supported release. > > Please check whether this bug is still an issue on the '27' release. > If you find this bug not being applicable on this release, please close it. It still does it on f28 for me: May 31 09:01:26 dgilbert-t530 python3[2677]: SELinux is preventing iscsid from module_load access on the system Unknown. If you believe that iscsid should be allowed module_load access on the Unknown system by default. # ausearch -c 'iscsid' --raw | audit2allow -M my-iscsid # semodule -X 300 -i my-iscsid.pp
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.