Bug 624056

Summary: SELinux is preventing /bin/login "write" access on user.
Product: [Fedora] Fedora Reporter: Gavin Romig-Koch <gavin>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:8fdc37b3b4089a9698ef6efcba994c3212d684766892eff4bec35346f1201d1a
Fixed In Version: selinux-policy-3.8.8-14.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-24 01:50:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gavin Romig-Koch 2010-08-13 14:23:08 UTC
Summary:

SELinux is preventing /bin/login "write" access on user.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by login. It is not expected that this access is
required by login and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:local_login_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                user [ dir ]
Source                        login
Source Path                   /bin/login
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-ng-2.18-3.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.8.8-10.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35-3.fc14.x86_64 #1 SMP Fri
                              Aug 6 19:41:28 UTC 2010 x86_64 x86_64
Alert Count                   6
First Seen                    Thu 12 Aug 2010 11:57:08 AM EDT
Last Seen                     Thu 12 Aug 2010 01:33:53 PM EDT
Local ID                      1382fa15-48db-45a3-a662-5dab67f0f02e
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1281634433.258:118): avc:  denied  { write } for  pid=1147 comm="login" name="user" dev=cgroup ino=16342 scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1281634433.258:118): avc:  denied  { add_name } for  pid=1147 comm="login" name="root" scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1281634433.258:118): avc:  denied  { create } for  pid=1147 comm="login" name="root" scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1281634433.258:118): arch=c000003e syscall=83 success=yes exit=0 a0=13f2320 a1=1ed a2=0 a3=1a items=0 ppid=1 pid=1147 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty2 ses=5 comm="login" exe="/bin/login" subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,login,local_login_t,cgroup_t,dir,write
audit2allow suggests:

#============= local_login_t ==============
#!!!! The source type 'local_login_t' can write to a 'dir' of the following types:
# auth_cache_t, pam_var_run_t, local_login_tmp_t

allow local_login_t cgroup_t:dir { write create add_name };

Comment 1 Daniel Walsh 2010-08-13 18:43:09 UTC
You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.8.8-14.fc14

Comment 2 Daniel Walsh 2010-08-13 18:43:33 UTC
*** Bug 624057 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2010-08-13 20:30:03 UTC
selinux-policy-3.8.8-14.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/selinux-policy-3.8.8-14.fc14

Comment 4 Fedora Update System 2010-08-24 01:49:33 UTC
selinux-policy-3.8.8-14.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.