Bug 389001 - SELinux gnome-keyring-d denial when plugging in a USB Flash Drive
SELinux gnome-keyring-d denial when plugging in a USB Flash Drive
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gdm (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Ray Strode [halfline]
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-17 18:40 EST by vfiend
Modified: 2009-01-09 02:26 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-09 02:26:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description vfiend 2007-11-17 18:40:10 EST
After plugging in a USB Flash Drive.. (Note, i have enabled pam keyring to
automatically unlock my gnome-keyring on login, if that's relevant)

Summary
    SELinux is preventing gnome-keyring-d (xdm_t) "search" to <Unknown>
    (dosfs_t).

...

Additional Information        

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:dosfs_t:s0
Target Objects                None [ dir ]
Affected RPM Packages         
Policy RPM                    selinux-policy-3.0.8-53.fc8
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.catchall_file
Host Name                     monolith
Platform                      Linux monolith 2.6.23.1-49.fc8 #1 SMP Thu Nov 8
                              22:14:09 EST 2007 x86_64 x86_64
Alert Count                   2
First Seen                    Sat 17 Nov 2007 03:34:22 PM PST
Last Seen                     Sat 17 Nov 2007 03:35:08 PM PST
Local ID                      843cd4a0-dfa6-4eff-b662-6282c90c9a78
Line Numbers                  

Raw Audit Messages            

avc: denied { search } for comm=gnome-keyring-d dev=sdc1 name=/ pid=2628
scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tclass=dir
tcontext=system_u:object_r:dosfs_t:s0
Comment 1 vfiend 2007-11-18 20:06:56 EST
Also happens when CDs are inserted and auto-mounted
Comment 2 Daniel Walsh 2007-11-19 10:36:05 EST
This looks like

session    optional    pam_gnome_keyring.so auto_start

Is in the wrong place in you pam file.  It has to be placed after the 

session    required    pam_selinux.so open

line.
Comment 3 vfiend 2007-11-20 04:50:46 EST
It is (and was by default), and I am still getting these denials.
Comment 4 vfiend 2007-11-20 04:53:47 EST
I attempted moving the line

session optional pam_keyring.so

to after

session    required    pam_selinux.so open

, however. This still resulted in the same denials (even after a full reboot,
just to make sure).
Comment 5 Daniel Walsh 2007-11-20 06:31:40 EST
Are you sticking the usb key in before login?
Comment 6 Daniel Walsh 2007-11-20 06:32:12 EST
What does

ps -eZ | grep keyring

Show?
Comment 7 vfiend 2007-11-20 07:17:23 EST
No, i'm inserting the media after i've logged in.


Ouput:

system_u:system_r:xdm_t:s0-s0:c0.c1023 2327 ?  00:00:00 gnome-keyring-d
Comment 8 Daniel Walsh 2007-11-20 08:14:45 EST
Well that is the problem.  gnome-keyring-daemon should be running in the users
context not in xdm_t.

Ray, do you have any idea why this is happening?

On my machine  I see

unconfined_u:system_r:unconfined_t:s0 2775 ?   00:00:00 gnome-keyring-d
Comment 9 Ray Strode [halfline] 2007-11-20 10:13:45 EST
Dan, not sure.  

Just to be sure, vfiend, you changed /etc/pam.d/gdm ?
Comment 10 Ray Strode [halfline] 2007-11-20 10:18:14 EST
oh i see in comment 4 you mentioned pam_keyring, not pam_gnome_keyring.  Those
are different modules, that's probably why the change didn't work.

What I don't understand is why your pam file is wrong in the first place.  Is
this machine from post-f7 rawhide?
Comment 11 Daniel Walsh 2007-11-20 10:21:02 EST
You moved the wrong line.

session optional pam_keyring.so

You were supposed to move 

session    optional    pam_gnome_keyring.so auto_start

This is what mine looks like

# more /etc/pam.d/gdm
#%PAM-1.0
auth     [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth       required    pam_env.so
auth       include     system-auth
auth       optional    pam_gnome_keyring.so
account    required    pam_nologin.so
account    include     system-auth
password   include     system-auth
session    required    pam_selinux.so close
session    include     system-auth
session    required    pam_loginuid.so
session    optional    pam_console.so
session    required    pam_selinux.so open
session    optional    pam_keyinit.so force revoke
session    required    pam_namespace.so
session    optional    pam_gnome_keyring.so auto_start
Comment 12 vfiend 2007-11-20 18:17:02 EST
I tried both, "session    optional    pam_gnome_keyring.so auto_start" was
already in the correct place, here is what my /etc/pam.d/gdm looks like:

#%PAM-1.0
auth     [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth       required    pam_env.so
auth optional pam_keyring.so try_first_pass
auth       include     system-auth
auth       optional    pam_gnome_keyring.so
account    required    pam_nologin.so
account    include     system-auth
password   include     system-auth
session    required    pam_selinux.so close
session    include     system-auth
session    required    pam_loginuid.so
session    optional    pam_console.so
session optional pam_keyring.so
session    required    pam_selinux.so open
session    optional    pam_keyinit.so force revoke
session    required    pam_namespace.so
session    optional    pam_gnome_keyring.so auto_start
Comment 13 Daniel Walsh 2007-11-26 11:57:36 EST
I think this is a gdm problem.
Comment 14 Bug Zapper 2008-11-26 03:32:35 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  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 WONTFIX if it remains open with a Fedora 
'version' of '8'.

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 prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 15 Bug Zapper 2009-01-09 02:26:58 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 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.

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.