Bug 1255951 - SELinux policy prevents lircd from dropping privileges
SELinux policy prevents lircd from dropping privileges
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2015-08-22 05:11 EDT by Michael Chapman
Modified: 2016-07-19 13:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 13:37:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Chapman 2015-08-22 05:11:39 EDT
This bug is reported against selinux-policy-targeted-3.13.1-128.10.fc22.noarch.

lircd can be configured to run as a low-privilege user through its --effective-user command-line option or effective-user config option. This is thwarted by the current SELinux targeted policy on F22, however, as it does not permit lircd to read /etc/passwd and /etc/group or call setuid() and setgid(). lircd continues to run as the root user if SELinux is enforcing.

The log message from lircd is:

  lircd-0.9.2a[15384]: Illegal effective uid: lirc: Permission denied

This is from its attempt to call getpwnam on the username "lirc" (i.e. reading /etc/passwd).

My workaround is the following custom policy:

  policy_module(my_lircd, 1.0.0)

      type lircd_t;

  allow lircd_t self:capability { setuid setgid };

setgid() isn't used by lirc 0.9.2, but it will be by lirc 0.9.3.
Comment 1 Fedora End Of Life 2016-07-19 13:37:26 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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

Thank you for reporting this bug and we are sorry it could not be fixed.

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