Bug 1675125
| Summary: | Moby-engine - SELinux is not enabled in Moby Engine in the systemd unit file | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Scott McCarty <smccarty> |
| Component: | moby-engine | Assignee: | fedora.dm0 |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 29 | CC: | adimania, admiller, amurdaca, cje, damichae, dustymabe, dwalsh, fedora.dm0, ichavero, jcajka, lantw44, lsm5, nalin, pasik, santiago, vbatts |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-05-15 04:09: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: | |||
|
Description
Scott McCarty
2019-02-11 19:56:18 UTC
More info here: https://www.openwall.com/lists/oss-security/2019/02/11/2 Also, I verified that you can add a --selinux-enabled to the systemd unit file like this, which protects the host: ExecStart=/usr/bin/dockerd --selinux-enabled I think in the latest moby, you can set this flag in a file in /etc/. /etc/docker.json or /etc/config/docker.json or something like that. Would be better to allow uses to easily change the defaults. Dan,
You are dead on. I don't know the rules in Fedora, can we just rebase to master? I agree everything looks good in Master.
If we can't rebase, it looks like The F29 branch doesn't have a docker.sysconfig nor a docker.service file, so I believe the spec file uses the upstream. The Master branch, on the other hand, has both and "should" start correctly (I haven't been able to build a package to test yet). Sadly, I "tried" to add the files to f29 branch, but I can't push files (can't figure out what password to use for the Fedora GitLab instance :-( ).
That said, I "think" all that needs done is to copy these two files from the Master branch, to the F29 branch, and rebuild. I looked at the spec file between the two and didn't see anything different. I think the Fedora package just "overwrites" the original files in the upstream...
As noted, this was done for Fedora 30 a few months ago, but changing a default setting like enabling SELinux seems like it would be disruptive to existing users on a released version. Fedora 29 users that want SELinux can change the setting with the standard systemd methods, such as making a dropin with "systemctl edit docker" containing:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --selinux-enabled
If the concern with this is CVE-2019-5736, the fix was pushed for testing when the embargo lifted on Monday: https://bodhi.fedoraproject.org/updates/FEDORA-2019-352d4b9cd8
(In reply to David Michael from comment #4) > As noted, this was done for Fedora 30 a few months ago, but changing a > default setting like enabling SELinux seems like it would be disruptive to > existing users on a released version. Fedora 29 users that want SELinux can > change the setting with the standard systemd methods, such as making a > dropin with "systemctl edit docker" containing: > > [Service] > ExecStart= > ExecStart=/usr/bin/dockerd --selinux-enabled > > If the concern with this is CVE-2019-5736, the fix was pushed for testing > when the embargo lifted on Monday: > https://bodhi.fedoraproject.org/updates/FEDORA-2019-352d4b9cd8 Kinda, it was more that defense in depth is good because that specific CVE likely won't be the last, and F29 is the latest version. I totally understand if you want to wait until F30 though. It looks good in master. FYI i've tried adding {"selinux-enabled": true} in /etc/docker/daemon.json and that looks like it works, because if i add it to the ExecStart in the .service file as well then the service fails with "directives are specified both as a flag and in the configuration file: selinux-enabled: (from flag: true, from file: true)".
cje I tried it again on Fedora 29, and SELinux still doesn't seem enabled by default... (In reply to Scott McCarty from comment #7) > cje I tried it again on Fedora 29, and SELinux still doesn't > seem enabled by default... Right. That is by design. David decided that it would be a breaking change to enable SELinux in the middle of a release (see comment#4) . I agree with him. We don't want users systems to just stop working overnight. They'll get the better security defaults in F30. Couldn't they get it only when fresh install. Even in F30 we don't want to update a F29 system and have Moby broken in F30. (In reply to Daniel Walsh from comment #9) > Couldn't they get it only when fresh install. Even in F30 we don't want to > update a F29 system and have Moby broken in F30. I defer to David or Lokesh (maintainers of the package) on this. They'd be able to say how much work it would be or if it would be worth doing it over waiting for f30. This is fixed in F30 and rawhide while F29 was left as is for compatibility, so I think this can be closed. |