Bug 2144899 - SE Linux prohibits colord from acessing some files
Summary: SE Linux prohibits colord from acessing some files
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: colord
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-22 16:45 UTC by Tiago d'Almeida
Modified: 2023-12-06 11:29 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-12-06 11:29:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tiago d'Almeida 2022-11-22 16:45:25 UTC
Description of problem:
After start the system and login, I receive a SE Linux message.

Version-Release number of selected component (if applicable):
Fedora 37 cinnamom spin

How reproducible:
Sometimes.

Steps to Reproduce:
1. Start the system and login.
2. Wait or see if there is some notification from SE Troubleshooting.

Actual results:
Error/Warning

Expected results:
No error/warning

Additional info:

The following is the complete message from SE Troubleshoting (I tried the first one, but unsuccessfully):
```
SELinux está a proibir colord de map aceder a ficheiro /home/..username../.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc.

*****  Plugin restorecon (92.2 confidence) suggests   ************************

If you want to fix the label. 
/home/..username../.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc default label should be icc_data_home_t.
Em seguida you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Fazer
# /sbin/restorecon -v /home/..username../.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc

*****  Plugin catchall_boolean (7.83 confidence) suggests   ******************

If you want to allow domain to can mmap files
Em seguida you must tell SELinux about this by enabling the 'domain_can_mmap_files' boolean.

Fazer
setsebool -P domain_can_mmap_files 1

*****  Plugin catchall (1.41 confidence) suggests   **************************

If you believe that colord should be allowed map access on the edid-e4dcb719f7d42e152a516cb6de2b30e3.icc file by default.
Em seguida you should report this as a bug.
You can generate a local policy module to allow this access.
Fazer
allow this access for now by executing:
# ausearch -c 'colord' --raw | audit2allow -M my-colord
# semodule -X 300 -i my-colord.pp

Informações adicionais:
Contexto de Origem            system_u:system_r:colord_t:s0
Contexto de Destino           system_u:object_r:dosfs_t:s0
Objectos de Destino           /home/..username../.local/share/icc/edid-
                              e4dcb719f7d42e152a516cb6de2b30e3.icc [ file ]
Fonte                         colord
Caminho de Origem             colord
Porto                         <Desconhecido>
Máquina                       turtle.local
Pacotes RPM Fonte             
Pacotes RPM Destino           
SELinux Policy RPM            selinux-policy-targeted-37.14-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.14-1.fc37.noarch
Selinux Activo                True
Tipo de Política              targeted
Modo de Execução Forçada      Enforcing
Nome da Máquina               turtle.local
Plataforma                    Linux turtle.local 6.0.9-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Nov 16 17:36:22 UTC 2022
                              x86_64 x86_64
Contador de Alertas           2
Primeira Vez Visto            2022-11-22 16:37:54 WET
Última Vez Visto              2022-11-22 16:38:57 WET
ID Local                      bb56d4a1-a4ce-45d9-911b-8be4215c18f3

Mensagens de Auditoria em Bruto
type=AVC msg=audit(1669135137.815:288): avc:  denied  { map } for  pid=1289 comm="colord" path="/home/..username../.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc" dev="sda5" ino=18680 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:dosfs_t:s0 tclass=file permissive=0


Hash: colord,colord_t,dosfs_t,file,map

```

Comment 1 Tiago d'Almeida 2022-12-12 12:09:13 UTC
Same error today:


SELinux está a proibir colord de map aceder a ficheiro /home/user/.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc.

*****  Plugin restorecon (92.2 confidence) suggests   ************************

If you want to fix the label. 
/home/user/.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc default label should be icc_data_home_t.
Em seguida you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Fazer
# /sbin/restorecon -v /home/user/.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc

*****  Plugin catchall_boolean (7.83 confidence) suggests   ******************

If you want to allow domain to can mmap files
Em seguida you must tell SELinux about this by enabling the 'domain_can_mmap_files' boolean.

Fazer
setsebool -P domain_can_mmap_files 1

*****  Plugin catchall (1.41 confidence) suggests   **************************

If you believe that colord should be allowed map access on the edid-e4dcb719f7d42e152a516cb6de2b30e3.icc file by default.
Em seguida you should report this as a bug.
You can generate a local policy module to allow this access.
Fazer
allow this access for now by executing:
# ausearch -c 'colord' --raw | audit2allow -M my-colord
# semodule -X 300 -i my-colord.pp

Informações adicionais:
Contexto de Origem            system_u:system_r:colord_t:s0
Contexto de Destino           system_u:object_r:dosfs_t:s0
Objectos de Destino           /home/user/.local/share/icc/edid-
                              e4dcb719f7d42e152a516cb6de2b30e3.icc [ file ]
Fonte                         colord
Caminho de Origem             colord
Porto                         <Desconhecido>
Máquina                       ....
Pacotes RPM Fonte             
Pacotes RPM Destino           
SELinux Policy RPM            selinux-policy-targeted-37.15-1.fc37.noarch
Local Policy RPM              selinux-policy-targeted-37.15-1.fc37.noarch
Selinux Activo                True
Tipo de Política              targeted
Modo de Execução Forçada      Enforcing
Nome da Máquina               ....
Plataforma                    Linux .... 6.0.12-300.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Dec 8 16:58:47 UTC 2022 x86_64
                              x86_64
Contador de Alertas           8
Primeira Vez Visto            2022-11-22 16:37:54 WET
Última Vez Visto              2022-12-12 11:52:44 WET
ID Local                      bb56d4a1-a4ce-45d9-911b-8be4215c18f3

Mensagens de Auditoria em Bruto
type=AVC msg=audit(1670845964.276:254): avc:  denied  { map } for  pid=1256 comm="colord" path="/home/..../.local/share/icc/edid-e4dcb719f7d42e152a516cb6de2b30e3.icc" dev="sda5" ino=18680 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:dosfs_t:s0 tclass=file permissive=0


Hash: colord,colord_t,dosfs_t,file,map

Comment 2 Aoife Moloney 2023-11-23 00:35:02 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
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 EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Aoife Moloney 2023-12-06 11:29:58 UTC
Fedora Linux 37 entered end-of-life (EOL) status on None.

Fedora Linux 37 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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.