Bug 1719067
Summary: | BUG: EACCES on writing empty value to /proc/self/attr/keycreate | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Kirill Kolyshkin <kolyshkin> |
Component: | kernel | Assignee: | Ondrej Mosnacek <omosnace> |
kernel sub component: | SELinux | QA Contact: | Milos Malik <mmalik> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | medium | CC: | dwalsh, lsm5, plautrba, zpytela |
Version: | 8.1 | Keywords: | AutoVerified, FastFix, Patch, Reproducer |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | kernel-4.18.0-112.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-05 21:57:39 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
Kirill Kolyshkin
2019-06-11 00:40:42 UTC
I am always able to reproduce it on a freshly installed (latest) CentOS. Once I do something, say install container-selinux package, the bug disappears entirely, and removing container-selinux won't help. Sometimes a reboot helps to bring it back, sometimes not, and to repro I have to install a fresh CentOS system. After going through the code, I agree that this is a bug. The kernel shouldn't check the key/create permission when the value is being cleared. The bug has been present upstream since the very introduction of the keycreate file (almost 13 years)... I'll send a fix to upstream soon. It is not clear at this point whether we will fix this in RHEL-7 or defer to RHEL-8. Patch posted upstream: https://lore.kernel.org/selinux/20190612081226.21004-1-omosnace@redhat.com/T/ I think this is fine in RHEL7, we can work around with the updated container-selinux policy. Thanks, Dan. I'm moving this to RHEL-8 then. Upstream commit: commit 464c258aa45b09f16aa0f05847ed8895873262d9 Author: Ondrej Mosnacek <omosnace> Date: Wed Jun 12 10:12:26 2019 +0200 selinux: fix empty write to keycreate file https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git/commit/?id=464c258aa45b09f16aa0f05847ed8895873262d9 Patch(es) available on kernel-4.18.0-112.el8 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:3517 |