Bug 1288762 - pam_limits(cockpit:session): Could not set limit for 'memlock'
pam_limits(cockpit:session): Could not set limit for 'memlock'
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
23
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-05 16:42 EST by Philipp Gampe
Modified: 2016-12-20 11:39 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 11:39:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/etc/pam.d/ (4.10 KB, application/x-gzip)
2015-12-06 17:50 EST, Philipp Gampe
no flags Details
/etc/security/limits.* (1.25 KB, application/x-gzip)
2015-12-07 05:19 EST, Philipp Gampe
no flags Details

  None (edit)
Description Philipp Gampe 2015-12-05 16:42:45 EST
Description of problem:
Login fails with some pam problems, properly related to selinux.

Version-Release number of selected component (if applicable):
Name        : cockpit
Arch        : x86_64
Epoch       : 0
Version     : 0.83
Release     : 1.fc23
Größe       : 35 k
Paketquelle : @System
Aus Paketqu : updates


How reproducible:
Always

Steps to Reproduce:
1. # setenforce enforcing
2. Open web interface
3. Try to login

Actual results:
Login fails with selinux enabled

Expected results:
Login works with selinux enabled

Additional info:

Setting selinux to be permissive allows to login.

# systemctl status cockpit.service -l
...
Dez 05 22:32:12 phil-t450 cockpit-session[32541]: pam_ssh_add: Failed adding some keys
Dez 05 22:32:12 phil-t450 cockpit-session[32541]: pam_limits(cockpit:session): Could not set limit for 'memlock': Operation not permitted
Dez 05 22:32:12 phil-t450 cockpit-ws[32259]: cockpit-session: couldn't open session: phil: Permission denied

# grep cockpit-session /var/log/audit/audit.log |tail |audit2why
type=AVC msg=audit(1449351132.589:3873): avc:  denied  { sys_resource } for  pid=32541 comm="cockpit-session" capability=24  scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:system_r:cockpit_session_t:s0 tclass=capability permissive=0

	Was caused by:
		Missing type enforcement (TE) allow rule.

		You can use audit2allow to generate a loadable module to allow this access.

type=AVC msg=audit(1449351136.484:3882): avc:  denied  { sys_resource } for  pid=32712 comm="cockpit-session" capability=24  scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:system_r:cockpit_session_t:s0 tclass=capability permissive=0

	Was caused by:
		Missing type enforcement (TE) allow rule.

		You can use audit2allow to generate a loadable module to allow this access.
Comment 1 Stef Walter 2015-12-06 11:49:39 EST
Please attach a tarball with the contents of your /etc/pam.d directory.
Comment 2 Philipp Gampe 2015-12-06 17:50 EST
Created attachment 1102948 [details]
/etc/pam.d/

Find attached the tar.gz of my /etc/pam.d/
Comment 3 Stef Walter 2015-12-07 04:37:04 EST
Thanks, you looking at this, you may also want to attach the contents of /etc/security/limits.d and /etc/security/limits.conf so the SELinux guys can see what they're missing, and why the PAM stack (running in processes like cockpit-session) cannot set the appropriate limits.
Comment 4 Philipp Gampe 2015-12-07 05:19 EST
Created attachment 1103148 [details]
/etc/security/limits.*

tar.gz of /etc/security/limits.d

This might be because of my hugetables configuration. Maybe I did it wrong :|
Comment 5 Stef Walter 2015-12-07 05:57:20 EST
(In reply to Philipp Gampe from comment #4)
> This might be because of my hugetables configuration. Maybe I did it wrong :|

No idea. But that does seem to be what SELinux is complaining about. I'll leave it to the SELinux guys to take from here.
Comment 6 Benjamin Xiao 2016-09-19 21:28:07 EDT
https://bugzilla.redhat.com/attachment.cgi?id=1191973

I think I am running into the same issue with F24
Comment 7 Fedora End Of Life 2016-11-24 08:59:49 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2016-12-20 11:39:36 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 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
bug.

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.