Bug 668236

Summary: SELinux powstrzymuje /usr/bin/kphononplayer przed ustawieniem stosu programu jako wykonywalny.
Product: [Fedora] Fedora Reporter: emanmc <emanmc>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:d3206e1a0f97fb4c415ab0d592b4ea39cbc966289a6e5c17f607ba58e9baf5ce
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-10 10:01:56 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 emanmc 2011-01-09 10:33:02 UTC
Podsumowanie:

SELinux powstrzymuje /usr/bin/kphononplayer przed ustawieniem stosu programu
jako wykonywalny.

Szczegółowy opis:

The kphononplayer application attempted to make its stack executable. This is a
potential security problem. This should never ever be necessary. Stack memory is
not executable on most OSes these days and this will not change. Executable
stack memory is one of the biggest security problems. An execstack error might
in fact be most likely raised by malicious code. Applications are sometimes
coded incorrectly and request this permission. The SELinux Memory Protection
Tests (http://www.akkadia.org/drepper/selinux-mem.html) web page explains how to
remove this requirement. If kphononplayer does not work and you need it to work,
you can configure SELinux temporarily to allow this access until the application
is fixed. Please file a bug report.

Zezwalanie na dostęp:

Czasami biblioteka jest przypadkowo oznaczona flagą wykonywalności stosu, jeśli
taka biblioteka zostanie znaleziona, można ją wyczyścić za pomocą execstack -c
LIBRARY_PATH. Wtedy należy ponownie uruchomić aplikację. Jeśli dalej nie chce
działać, można ponownie dodać flagę za pomocą execstack -s LIBRARY_PATH. Jeśli
jednak kphononplayer ma zaufanie, że będzie poprawne się uruchomiał, można
zmienić kontekst pliku na execmem_exec_t. "chcon -t execmem_exec_t
'/usr/bin/kphononplayer'" Należy także zmienić domyślny kontekst plików w
systemie, aby zachować go nawet po pełnym ponownym nadaniu etykiet. "semanage
fcontext -a -t execmem_exec_t '/u

Polecenie naprawy:

chcon -t execmem_exec_t '/usr/bin/kphononplayer'

Dodatkowe informacje:

Kontekst źródłowy             unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Kontekst docelowy             unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Obiekty docelowe              None [ process ]
Źródło                        kphononplayer
Ścieżka źródłowa              /usr/bin/kphononplayer
Port                          <Nieznane>
Komputer                      (usunięto)
Źródłowe pakiety RPM          kmplayer-0.11.2c-1.fc14
Docelowe pakiety RPM          
Pakiet RPM polityki           selinux-policy-3.9.7-19.fc14
SELinux jest włączony         True
Typ polityki                  targeted
Tryb wymuszania               Enforcing
Nazwa wtyczki                 allow_execstack
Nazwa komputera               (usunięto)
Platforma                     Linux (usunięto) 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct
                              18 23:56:17 UTC 2010 i686 i686
Liczba alarmów                8
Po raz pierwszy               nie, 9 sty 2011, 11:25:48
Po raz ostatni                nie, 9 sty 2011, 11:26:31
Lokalny identyfikator         c535cedb-aa86-4d5b-85f4-296852152d2b
Liczba wierszy                

Surowe komunikaty audytu      

node=(usunięto) type=AVC msg=audit(1294568791.852:48095): avc:  denied  { execstack } for  pid=2315 comm="kphononplayer" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process

node=(usunięto) type=SYSCALL msg=audit(1294568791.852:48095): arch=40000003 syscall=125 success=no exit=-13 a0=bfaa0000 a1=1000 a2=1000007 a3=ab102970 items=0 ppid=2182 pid=2315 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="kphononplayer" exe="/usr/bin/kphononplayer" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execstack,kphononplayer,unconfined_t,unconfined_t,process,execstack
audit2allow suggests:

#============= unconfined_t ==============
#!!!! This avc can be allowed using the boolean 'allow_execstack'

allow unconfined_t self:process execstack;

Comment 1 Miroslav Grepl 2011-01-10 10:01:56 UTC

*** This bug has been marked as a duplicate of bug 652297 ***