Bug 1887111

Summary: SELinux is preventing graph.cgi from read access on the directory cpu.
Product: [Fedora] Fedora Reporter: W Agtail <crash70>
Component: dspamAssignee: Orphan Owner <extras-orphan>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 32CC: extras-orphan, nathanael, perl-devel
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-25 17:29:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description W Agtail 2020-10-10 22:19:14 UTC
Description of problem:

SELinux is preventing graph.cgi from read access on the directory cpu.
                                                  
                                                  *****  Plugin catchall (100. confidence) suggests   **************************
                                                  
                                                  If you believe that graph.cgi should be allowed read access on the cpu directory by default.
                                                  Then you should report this as a bug.
                                                  You can generate a local policy module to allow this access.
                                                  Do
                                                  allow this access for now by executing:
                                                  # ausearch -c 'graph.cgi' --raw | audit2allow -M my-graphcgi
                                                  # semodule -X 300 -i my-graphcgi.pp



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

dspam-3.10.2-30.fc31.x86_64
dspam-web-3.10.2-30.fc31.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install dspam-web
2. http://hostname:8009/dspam.cgi?user=myuser&template=analysis&language=en
3.

Actual results:
SELinux message as per above.


Expected results:
No SElinux messages.


Additional info:
Many thanks

Comment 1 W Agtail 2020-10-10 22:23:31 UTC
sealert -l f48939da-f2cb-40e4-92a1-5170e1d41303
SELinux is preventing dspam from append access on the file system.log.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that dspam should be allowed append access on the system.log file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'dspam' --raw | audit2allow -M my-dspam
# semodule -X 300 -i my-dspam.pp


Additional Information:
Source Context                system_u:system_r:antivirus_t:s0
Target Context                system_u:object_r:dspam_var_lib_t:s0
Target Objects                system.log [ file ]
Source                        dspam
Source Path                   dspam
Port                          <Unknown>
Host                          kvm7.home.local
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.5-43.fc32.noarch
Local Policy RPM              selinux-policy-targeted-3.14.5-43.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     kvm7.home.local
Platform                      Linux kvm7.home.local 5.8.11-200.fc32.x86_64 #1
                              SMP Wed Sep 23 13:51:28 UTC 2020 x86_64 x86_64
Alert Count                   34
First Seen                    2020-10-10 09:31:40 BST
Last Seen                     2020-10-10 23:22:04 BST
Local ID                      f48939da-f2cb-40e4-92a1-5170e1d41303

Raw Audit Messages
type=AVC msg=audit(1602368524.945:78868): avc:  denied  { append } for  pid=2977396 comm="dspam" name="system.log" dev="dm-8" ino=12584201 scontext=system_u:system_r:antivirus_t:s0 tcontext=system_u:object_r:dspam_var_lib_t:s0 tclass=file permissive=1


Hash: dspam,antivirus_t,dspam_var_lib_t,file,append

Comment 2 W Agtail 2020-10-10 22:30:11 UTC
SELinux is preventing graph.cgi from read access on the directory cpu.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that graph.cgi should be allowed read access on the cpu directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'graph.cgi' --raw | audit2allow -M my-graphcgi
# semodule -X 300 -i my-graphcgi.pp


Additional Information:
Source Context                system_u:system_r:dspam_script_t:s0
Target Context                system_u:object_r:sysfs_t:s0
Target Objects                cpu [ dir ]
Source                        graph.cgi
Source Path                   graph.cgi
Port                          <Unknown>
Host                          kvm7.home.local
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.5-43.fc32.noarch
Local Policy RPM              
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     kvm7.home.local
Platform                      Linux kvm7.home.local 5.8.11-200.fc32.x86_64 #1
                              SMP Wed Sep 23 13:51:28 UTC 2020 x86_64 x86_64
Alert Count                   57
First Seen                    2020-10-06 22:03:10 BST
Last Seen                     2020-10-10 23:29:25 BST
Local ID                      d7c006a1-31d8-41da-9e86-20b7ba61975c

Raw Audit Messages
type=AVC msg=audit(1602368965.274:78914): avc:  denied  { read } for  pid=2979679 comm="graph.cgi" name="cpu" dev="sysfs" ino=33 scontext=system_u:system_r:dspam_script_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=1


Hash: graph.cgi,dspam_script_t,sysfs_t,dir,read

Comment 3 Fedora Program Management 2021-04-29 16:57:32 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
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
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2021-05-25 17:29:59 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 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 please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.