Bug 799676 - SELinux is preventing /usr/bin/dia from 'mmap_zero' accesses on the memprotect Unknown.
SELinux is preventing /usr/bin/dia from 'mmap_zero' accesses on the memprotec...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
rawhide
i386 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:14e7302ff3c...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-04 02:08 EST by nomnex
Modified: 2012-03-05 05:16 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-05 04:24:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description nomnex 2012-03-04 02:08:31 EST
SELinux is preventing /usr/bin/dia from 'mmap_zero' accesses on the memprotect Unknown.

*****  Plugin mmap_zero (53.1 confidence) suggests  **************************

If you do not think /usr/bin/dia should need to mmap low memory in the kernel.
Then you may be under attack by a hacker, this is a very dangerous access.
Do
contact your security administrator and report this issue.

*****  Plugin catchall_boolean (42.6 confidence) suggests  *******************

If you want to control the ability to mmap a low area of the address space, as configured by /proc/sys/kernel/mmap_min_addr.
Then you must tell SELinux about this by enabling the 'mmap_low_allowed' boolean.
Do
setsebool -P mmap_low_allowed 1

*****  Plugin catchall (5.76 confidence) suggests  ***************************

If you believe that dia should be allowed mmap_zero access on the Unknown memprotect 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:
# grep dia /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                Unknown [ memprotect ]
Source                        dia
Source Path                   /usr/bin/dia
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dia-0.97-5.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-51.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.42.7-1.fc15.i686 #1 SMP Tue Feb 21
                              02:16:57 UTC 2012 i686 i686
Alert Count                   154
First Seen                    Sun 04 Mar 2012 12:22:24 PM JST
Last Seen                     Sun 04 Mar 2012 04:06:22 PM JST
Local ID                      6b1ef8ce-435c-45bd-abcb-3fefbb3683c1

Raw Audit Messages
type=AVC msg=audit(1330844782.326:271): avc:  denied  { mmap_zero } for  pid=7741 comm="dia" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=memprotect


type=SYSCALL msg=audit(1330844782.326:271): arch=i386 syscall=mmap2 success=no exit=EACCES a0=0 a1=58ac0 a2=1 a3=2 items=0 ppid=1 pid=7741 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=dia exe=/usr/bin/dia subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash: dia,unconfined_t,unconfined_t,memprotect,mmap_zero

audit2allow

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

allow unconfined_t self:memprotect mmap_zero;

audit2allow -R

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

allow unconfined_t self:memprotect mmap_zero;
Comment 1 Miroslav Grepl 2012-03-05 04:24:46 EST
setroubleshoot tells you what to do. "mmap_zero" is pretty dangerous access which we do not want to allow by default.

Does "dia" work correctly?
Comment 2 nomnex 2012-03-05 05:16:50 EST
Unfortunately Dia kept crashing after each new SELinux warning msg. I have follow the direction of the SELinux troubleshooting (well done, BTH), and I passed the command to allow "mmap_zero", although I don't know what I am doing.

Am I the only Dia user on F15 affected by this warning? My understanding of SELinux is too vague (that's the police officer, with a stick, inside my box?) Nevertheless, why does Dia from the Fedora repository requests a custom rule, potentially dangerous?

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