Bug 462777 - AVC for gdm execute ./bash
AVC for gdm execute ./bash
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2008-09-18 16:27 EDT by Andrew Farris
Modified: 2008-09-18 17:06 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-09-18 17:06:18 EDT
Type: ---
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 Andrew Farris 2008-09-18 16:27:42 EDT
Description of problem:
AVC for gdm execute ./bash

Version-Release number of selected component (if applicable):

Seems to occur on every login (maybe more often, I have about 40 entries for it).  I just updated to gdm out of koji, but it was happening with the repo version 2.23.92-4 as well before that.


SELinux is preventing the gdm (xdm_t) from executing ./bash.

Detailed Description:

SELinux has denied the gdm from executing ./bash. If gdm is supposed to be able
to execute ./bash, this could be a labeling problem. Most confined domains are
allowed to execute files labeled bin_t. So you could change the labeling on this
file to bin_t and retry the application. If this gdm is not supposed to execute
./bash, this could signal a intrusion attempt.

Allowing Access:

If you want to allow gdm to execute ./bash: chcon -t bin_t './bash' If this fix
works, please update the file context on disk, with the following command:
semanage fcontext -a -t bin_t './bash' Please specify the full path to the
executable, Please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this selinux-policy
to make sure this becomes the default labeling.

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:usr_t:s0
Target Objects                ./bash [ file ]
Source                        gdm
Source Path                   /bin/bash
Port                          <Unknown>
Host                          durthang-nix
Source RPM Packages           bash-3.2-27.fc10
Target RPM Packages           
Policy RPM                    selinux-policy-3.5.7-1.fc10
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   execute
Host Name                     durthang-nix
Platform                      Linux durthang-nix 2.6.27-0.329.rc6.git2.fc10.i686
                              #1 SMP Mon Sep 15 19:33:33 EDT 2008 i686 i686
Alert Count                   3
First Seen                    Wed 17 Sep 2008 06:01:16 PM PDT
Last Seen                     Thu 18 Sep 2008 01:09:19 PM PDT
Local ID                      eee331cc-3609-404e-8f1d-cd0be6022899
Line Numbers                  

Raw Audit Messages            

node=durthang-nix type=AVC msg=audit(1221768559.916:7): avc:  denied  { execute } for  pid=2565 comm="gdm" name="bash" dev=sda3 ino=695973 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file

node=durthang-nix type=SYSCALL msg=audit(1221768559.916:7): arch=40000003 syscall=33 success=no exit=-13 a0=8f4d3e0 a1=1 a2=11 a3=8f4d3e0 items=0 ppid=1 pid=2565 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="gdm" exe="/bin/bash" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)
Comment 1 Daniel Walsh 2008-09-18 17:06:18 EDT
Why is bash labeled usr_t?

Looks like you have a badly labeled file system.

touch /.autorelabel; reboot

To fix the labels.

/bin/bash should be labeled shell_exec_t.

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