Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1420045

Summary: systemd-importd runs as init_t
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Vrabec <lvrabec>
Component: systemdAssignee: systemd-maint
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: lvrabec, mmalik, msekleta, plautrba, pvrabec, ssekidde, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1365944 Environment:
Last Closed: 2021-01-15 07:31:31 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1365944, 1472751    

Comment 1 Lukáš Nykrýn 2017-02-07 17:04:08 UTC
https://github.com/systemd/systemd/issues/3845

Comment 2 Michal Sekletar 2017-02-07 17:15:01 UTC
Maybe if you add a bound rule, basically saying that systemd_importd_t doesn't have more priviledges than init_t then we could get away without dropping NoNewPrivileges from importd unit file.

https://selinuxproject.org/page/Bounds_Rules
https://github.com/torvalds/linux/blob/d011a4d861ce583466a8ae72a0c8e7f51c8cba4e/security/selinux/hooks.c#L2272

Comment 4 Lukas Vrabec 2017-02-08 12:44:31 UTC
Michal, 

Typebounds are *not* solution here. We cannot use it right now. Problem is design on our policy. See following example:

In systemd.te file is defined type systemd_importd_t.

type systemd_importd_t;
type systemd_importd_exec_t;
init_daemon_domain(systemd_importd_t, systemd_importd_exec_t)

As you can see there is also macro called "init_daemon_domain". There are some allow rules needed to run type as daemon. *BUT* these rules are not allowed for init_t domain. 

This is reason why init_t cannot be bounding domain for systemd_importd_t domain.

Comment 5 Michal Sekletar 2017-04-19 16:27:01 UTC
I've learnt that selinux-policy still doesn't contain any rules for importd. Thus by fixing this bug (iow, by removing NoNewPrivileges=yes) we would harm security of the system. We need to postpone it until selinux-policy has coverage for importd.

Comment 9 RHEL Program Management 2021-01-15 07:31:31 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.