Bug 909554
| Summary: | SELinux is preventing /usr/lib/opera/opera from 'mmap_zero' accesses on the memprotect . | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mikhail <mikhail.v.gavrilov> | ||||
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 18 | CC: | dominick.grift, dwalsh, eparis, mgrepl, mikhail.v.gavrilov | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | i686 | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | abrt_hash:9d3a65b4e0b5775d1bb9daf498e4054ea2d3564680c68dea5d8a88be1560ce20 | ||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-02-12 19:22:41 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: | |||||||
| Attachments: |
|
||||||
I see this bug every time when application try allocate huge amount memory. So it is not a application problem. It is kernel or SELinux problem! Created attachment 695414 [details]
htop screenshot
Description of problem: I see this bug every time when application try allocate huge amount memory. So it is not a application problem. It is kernel or SELinux problem! Additional info: hashmarkername: setroubleshoot kernel: 3.7.6-201.fc18.i686.PAE type: libreport Demonstration memory hell: https://docs.google.com/file/d/0B0nwzlfiB4aQUnd2QXZTTlBCcTA/edit?usp=sharing mmap_zero is considered a dangerous access, but if you are willing to take the risk, then turn the boolean on. # setsebool -P mmap_low_allowed 1 More information on mmap_zero http://eparis.livejournal.com/ Eric why do we see this bug if DAC would have blocked it? Same with Opera https://bugzilla.redhat.com/show_bug.cgi?id=909554 |
Description of problem: I see this bug every time when application try allocate huge amount memory. So it is not a application problem. It is kernel or SELinux problem! SELinux is preventing /usr/lib/opera/opera from 'mmap_zero' accesses on the memprotect . ***** Plugin mmap_zero (53.1 confidence) suggests ************************** If you do not think /usr/lib/opera/opera 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. You can read 'unconfined_selinux' man page for more details. Do setsebool -P mmap_low_allowed 1 ***** Plugin catchall (5.76 confidence) suggests *************************** If you believe that opera should be allowed mmap_zero access on the 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 opera /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 [ memprotect ] Source opera Source Path /usr/lib/opera/opera Port <Unknown> Host (removed) Source RPM Packages opera-12.14-1737.i386 Target RPM Packages Policy RPM selinux-policy-3.11.1-76.fc18.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.7.6-201.fc18.i686.PAE #1 SMP Mon Feb 4 16:05:44 UTC 2013 i686 i686 Alert Count 688 First Seen 2013-02-09 16:50:58 YEKT Last Seen 2013-02-09 16:56:14 YEKT Local ID 48b42a65-16d5-433a-9dea-64eca7711b98 Raw Audit Messages type=AVC msg=audit(1360407374.499:296212): avc: denied { mmap_zero } for pid=506 comm="opera" 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(1360407374.499:296212): arch=i386 syscall=mmap2 per=400000 success=no exit=EACCES a0=0 a1=954e4 a2=1 a3=1 items=0 ppid=1681 pid=506 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=opera exe=/usr/lib/opera/opera subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) Hash: opera,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; Additional info: hashmarkername: setroubleshoot kernel: 3.7.6-201.fc18.i686.PAE type: libreport