Bug 1420045 - systemd-importd runs as init_t
Summary: systemd-importd runs as init_t
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1365944 1472751
TreeView+ depends on / blocked
 
Reported: 2017-02-07 16:32 UTC by Lukas Vrabec
Modified: 2021-01-15 07:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1365944
Environment:
Last Closed: 2021-01-15 07:31:31 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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