Bug 635514 - O SELinux está a impedir o acesso /usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bin/java "add_name" on 10187
Summary: O SELinux está a impedir o acesso /usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:504a78b4548...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-20 04:05 UTC by vitor.dominor
Modified: 2010-10-19 07:06 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-65.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-05 09:35:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Log of SELinux auditing warnings (4.29 MB, application/octet-stream)
2010-09-20 17:35 UTC, vitor.dominor
no flags Details

Description vitor.dominor 2010-09-20 04:05:31 UTC
Resumo:

O SELinux está a impedir o acesso
/usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bin/java "add_name" on 10187

Descrição Detalhada:

[java tem um tipo de permissão (boinc_project_t). Este acesso não foi negado.]

O SELinux negou o acesso pedido pelo java. Não se espera que este acesso seja
necessário para o java e este acesso poderá assinalar uma tentativa de intrusão.
Também é possível que a versão ou configuração específicas da aplicação estejam
a obrigá-la a precisar de acesso ad

A Permitir o Acesso:

Você pode gerar um módulo com uma politica local para permitir este acesso -
Consulte FAQ (http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Por
favor, preencha um relatório de erro.

Informação Adicional:

Contexto de Origem            system_u:system_r:boinc_project_t:s0
Contexto de Destino           system_u:object_r:tmp_t:s0
Objectos de Destino           10187 [ dir ]
Fonte                         java
Caminho de Origem             /usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bin/java
Porto                         <Desconhecida>
Máquina                       (removido)
Pacotes RPM Fonte             java-1.6.0-sun-1.6.0.21-1.0.cf
Pacotes RPM Destino           
RPM da Política               selinux-policy-3.7.19-54.fc13
Selinux Activo                True
Tipo de Política              targeted
Modo de Execução Forçada      Enforcing
Nome do Plugin                catchall
Nome da Máquina               (removido)
Plataforma                    Linux (removido) 2.6.34.6-54.fc13.x86_64 #1 SMP
                              Sun Sep 5 17:16:27 UTC 2010 x86_64 x86_64
Contador de Alertas           3
Primeira Vez Visto            Seg 20 Set 2010 03:48:19 WEST
Última Vez Visto              Seg 20 Set 2010 03:48:19 WEST
ID Local                      53e85b44-ca93-4b28-805d-8323b51285a8
Números de Linha              

Mensagens de Auditoria em Bru 

node=(removido) type=AVC msg=audit(1284950899.742:28649): avc:  denied  { add_name } for  pid=10190 comm="java" name="10187" scontext=system_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir

node=(removido) type=AVC msg=audit(1284950899.742:28649): avc:  denied  { create } for  pid=10190 comm="java" name="10187" scontext=system_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file

node=(removido) type=AVC msg=audit(1284950899.742:28649): avc:  denied  { read write open } for  pid=10190 comm="java" name="10187" dev=dm-5 ino=131088 scontext=system_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file

node=(removido) type=SYSCALL msg=audit(1284950899.742:28649): arch=c000003e syscall=2 per=400000 success=yes exit=7 a0=2b7450005ea0 a1=242 a2=180 a3=fffffffffffffff0 items=0 ppid=10185 pid=10190 auid=4294967295 uid=491 gid=476 euid=491 suid=491 fsuid=491 egid=476 sgid=476 fsgid=476 tty=(none) ses=4294967295 comm="java" exe="/usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bin/java" subj=system_u:system_r:boinc_project_t:s0 key=(null)



Hash String generated from  catchall,java,boinc_project_t,tmp_t,dir,add_name
audit2allow suggests:

#============= boinc_project_t ==============
allow boinc_project_t tmp_t:dir add_name;
#!!!! The source type 'boinc_project_t' can write to a 'file' of the following type:
# boinc_project_var_lib_t

allow boinc_project_t tmp_t:file { read write create open };

Comment 1 vitor.dominor 2010-09-20 04:14:29 UTC
There are about other 18 other different issues of SELinux access denied to operations of this boinc project, whose application is java-based.
I do not know which additional information would be useful, but it is clear this relates to the boinc project DistributedDataMining. I do not if it is not properly labelled, executing unexpected operations from the security point of view or doing something nasty (though unlikely).

Comment 2 Miroslav Grepl 2010-09-20 12:31:42 UTC
Could you attach your /var/log/audit/audit.log with other issues. We might want to add transition to java.

Comment 3 vitor.dominor 2010-09-20 17:35:59 UTC
Created attachment 448525 [details]
Log of SELinux auditing warnings

audit.log is hereby attached and no other issues are found besides the ones logged in this file. The behavior of the boinc client does not seem to be affected and no error messages are returned by the application.

Comment 4 Miroslav Grepl 2010-09-21 11:12:37 UTC
Thanks for your audit log.


Dan,
it looks like we can just add java_exec() and some additional rules. I will add a patch on fedorahosted for F14 policy.

Comment 5 Miroslav Grepl 2010-09-21 13:47:54 UTC
Fixed in selinux-policy-3.7.19-60.fc13

Comment 6 Fedora Update System 2010-09-24 13:57:59 UTC
selinux-policy-3.7.19-62.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-62.fc13

Comment 7 Fedora Update System 2010-09-26 04:31:58 UTC
selinux-policy-3.7.19-62.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-62.fc13

Comment 8 vitor.dominor 2010-09-28 22:40:19 UTC
I installed the update from updates-testing and ran boinc afterwards. One avc error message remained still. All other reported avcs seem to have been addressed.

-----------------------------------------------------------------------------

Resumo:

O SELinux está a impedir o acesso
/usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bin/java "write" on /var/lib/boinc

Descrição Detalhada:

[java tem um tipo de permissão (boinc_project_t). Este acesso não foi negado.]

O SELinux negou o acesso pedido pelo java. Não se espera que este acesso seja
necessário para o java e este acesso poderá assinalar uma tentativa de intrusão.
Também é possível que a versão ou configuração específicas da aplicação estejam
a obrigá-la a precisar de acesso ad

A Permitir o Acesso:

Você pode gerar um módulo com uma politica local para permitir este acesso -
Consulte FAQ (http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Por
favor, preencha um relatório de erro.

Informação Adicional:

Contexto de Origem            unconfined_u:system_r:boinc_project_t:s0
Contexto de Destino           system_u:object_r:boinc_var_lib_t:s0
Objectos de Destino           /var/lib/boinc [ dir ]
Fonte                         java
Caminho de Origem             /usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bin/java
Porto                         <Desconhecida>
Máquina                       perfect-tuxie
Pacotes RPM Fonte             java-1.6.0-sun-1.6.0.21-1.0.cf
Pacotes RPM Destino           boinc-client-6.10.45-1.r21128svn.fc13
RPM da Política               selinux-policy-3.7.19-62.fc13
Selinux Activo                True
Tipo de Política              targeted
Modo de Execução Forçada      Enforcing
Nome do Plugin                catchall
Nome da Máquina               perfect-tuxie
Plataforma                    Linux perfect-tuxie 2.6.34.7-56.fc13.x86_64 #1 SMP
                              Wed Sep 15 03:36:55 UTC 2010 x86_64 x86_64
Contador de Alertas           3
Primeira Vez Visto            Ter 28 Set 2010 23:24:21 WEST
Última Vez Visto              Ter 28 Set 2010 23:31:38 WEST
ID Local                      a5b255c0-4c92-4546-a55a-74a7b451b737
Números de Linha              

Mensagens de Auditoria em Bru 

node=perfect-tuxie type=AVC msg=audit(1285713098.499:32933): avc:  denied  { write } for  pid=5195 comm="java" name="boinc" dev=dm-4 ino=267015 scontext=unconfined_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:boinc_var_lib_t:s0 tclass=dir

node=perfect-tuxie type=SYSCALL msg=audit(1285713098.499:32933): arch=c000003e syscall=21 per=400000 success=yes exit=0 a0=2b5cb0178eb0 a1=2 a2=2b5cb0178eb0 a3=2b5cac332058 items=0 ppid=5022 pid=5195 auid=500 uid=491 gid=476 euid=491 suid=491 fsuid=491 egid=476 sgid=476 fsgid=476 tty=(none) ses=1 comm="java" exe="/usr/lib/jvm/java-1.6.0-sun-1.6.0.21/jre/bin/java" subj=unconfined_u:system_r:boinc_project_t:s0 key=(null)

Comment 9 Miroslav Grepl 2010-10-01 13:33:44 UTC
Fixed in selinux-policy-3.7.19-63.fc13

Comment 10 Fedora Update System 2010-10-05 09:34:47 UTC
selinux-policy-3.7.19-62.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-10-08 10:32:04 UTC
selinux-policy-3.7.19-65.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-65.fc13

Comment 12 Fedora Update System 2010-10-19 07:05:22 UTC
selinux-policy-3.7.19-65.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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