Bug 597800

Summary: SELinux powstrzymuje /home/marek/qBT_dir/sanctuary/bin/Sanctuary przed wczytaniem /home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so, który wymaga relokacji tekstu.
Product: [Fedora] Fedora Reporter: Marek Zdunek <mzdunek>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:53e918267b104b7ddd11a5b9dc3eae7f14eebea4b4604a1086630bf1f71d8c9f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-31 09:56:29 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 Marek Zdunek 2010-05-30 15:10:02 UTC
Podsumowanie:

SELinux powstrzymuje /home/marek/qBT_dir/sanctuary/bin/Sanctuary przed
wczytaniem /home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so, który wymaga
relokacji tekstu.

Szczegółowy opis:

Aplikacja Sanctuary próbowała wczytać
/home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so, który wymaga relokacji
tekstu. Jest to potencjalny problem z bezpieczeństwem. Większość bibliotek
nie musi mieć tego pozwolenia. Mogą one czasem być niepoprawnie napisane i
żądać tego pozwolenia. Strona WWW Testy ochrony pamięci SELinuksa
(http://people.redhat.com/drepper/selinux-mem.html) wyjaśnia, jak usunąć te
wymaganie. Można tymczasowo skonfigurować obejście SELinuksa, aby pozwalał
/home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so na użycie relokacji,
dopóki biblioteka nie zostanie naprawiona. proszę z

Zezwalanie na dostęp:

Jeśli /home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so ma zaufanie, że
będzie poprawne się uruchomiał, można zmienić kontekst pliku na
textrel_shlib_t. "chcon -t textrel_shlib_t
'/home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so'" 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 textrel_shlib_t
'/home/marek/qBT_dir/sanctuary/bin/libUnigine

Polecenie naprawy:

chcon -t textrel_shlib_t '/home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so'

Dodatkowe informacje:

Kontekst źródłowy          unconfined_u:unconfined_r:unconfined_execmem_t:s0-
                              s0:c0.c1023
Kontekst docelowy             unconfined_u:object_r:user_home_t:s0
Obiekty docelowe              /home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.s
                              o [ file ]
Źródło                     Sanctuary
Ścieżka źródłowa         /home/marek/qBT_dir/sanctuary/bin/Sanctuary
Port                          <Nieznane>
Komputer                      (usunięto)
Źródłowe pakiety RPM       
Docelowe pakiety RPM          
Pakiet RPM polityki           selinux-policy-3.7.19-21.fc13
SELinux jest włączony       True
Typ polityki                  targeted
Tryb wymuszania               Enforcing
Nazwa wtyczki                 allow_execmod
Nazwa komputera               (usunięto)
Platforma                     Linux amd64 2.6.33.4-95.fc13.x86_64 #1 SMP Thu May
                              13 05:16:23 UTC 2010 x86_64 x86_64
Liczba alarmów               2
Po raz pierwszy               nie, 30 maj 2010, 16:54:45
Po raz ostatni                nie, 30 maj 2010, 16:56:19
Lokalny identyfikator         e7a81a88-c435-49ae-844e-1fc1e0569778
Liczba wierszy                

Surowe komunikaty audytu      

node=amd64 type=AVC msg=audit(1275231379.445:24003): avc:  denied  { execmod } for  pid=8374 comm="Sanctuary" path="/home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so" dev=sdb6 ino=1837070 scontext=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

node=amd64 type=SYSCALL msg=audit(1275231379.445:24003): arch=40000003 syscall=125 success=no exit=-13 a0=48a000 a1=fc7000 a2=5 a3=ffb48a20 items=0 ppid=8373 pid=8374 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts2 ses=1 comm="Sanctuary" exe="/home/marek/qBT_dir/sanctuary/bin/Sanctuary" subj=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,Sanctuary,unconfined_execmem_t,user_home_t,file,execmod
audit2allow suggests:

#============= unconfined_execmem_t ==============
#!!!! This avc can be allowed using the boolean 'allow_execmod'

allow unconfined_execmem_t user_home_t:file execmod;

Comment 1 Miroslav Grepl 2010-05-31 09:56:29 UTC
Alert tells you what you can do.  

chcon -t textrel_shlib_t '/home/marek/qBT_dir/sanctuary/bin/libUnigine_x86.so'


Or you can turn off the protection by executing

setsebool -P allow_execmod 1