From: "mjw at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug uprobes/10595] New: uprobe return probes causes selinux failures
Date: Thu, 03 Sep 2009 12:25:00 -0000 [thread overview]
Message-ID: <20090903122458.10595.mjw@redhat.com> (raw)
When selinux is in enforcing mode and allow_execstack=false trying to set uprobe
return probes on an executable causes selinux denials (and failing to insert the
probe).
Take for example the bz10078.exp testcase, which simply does:
probe process("./bz10078").function("mkpoint*").return {
printf("%s returns\n", probefunc())
}
With selinux in enforcing mode and disallowing executable stacks:
$ setenforce Enforcing
$ setsebool allow_execstack=false
$ stap systemtap.base/bz10078.stp -c ./bz10078
/var/log/messages:
setroubleshoot: SELinux is preventing bz10078 from changing a writable memory
segment executable. For complete SELinux messages. run sealert -l
725eeb90-824c-4e00-b0c5-3575cdf7d070
$ sealert -l 725eeb90-824c-4e00-b0c5-3575cdf7d070
Summary:
SELinux is preventing bz10078 from changing a writable memory segment
executable.
Detailed Description:
The bz10078 application attempted to change the access protection of memory
(e.g., allocated using malloc). This is a potential security problem.
Applications should not be doing this. Applications are sometimes coded
incorrectly and request this permission. The SELinux Memory Protection Tests
(http://people.redhat.com/drepper/selinux-mem.html) web page explains how to
remove this requirement. If bz10078 does not work and you need it to work, you
can configure SELinux temporarily to allow this access until the application is
fixed. Please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.
Allowing Access:
If you trust bz10078 to run correctly, you can change the context of the
executable to execmem_exec_t. "chcon -t execmem_exec_t '<Unknown>'". You must
also change the default file context files on the system in order to preserve
them even on a full relabel. "semanage fcontext -a -t execmem_exec_t '<Unknown>'"
Fix Command:
chcon -t execmem_exec_t '<Unknown>'
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 None [ process ]
Source bz10078
Source Path <Unknown>
Port <Unknown>
Host springer.wildebeest.org
Source RPM Packages
Target RPM Packages
Policy RPM selinux-policy-3.6.12-80.fc11
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name allow_execmem
Host Name springer.wildebeest.org
Platform Linux springer.wildebeest.org
2.6.29.6-217.2.16.fc11.x86_64 #1 SMP Mon Aug 24
17:17:40 EDT 2009 x86_64 x86_64
Alert Count 2
First Seen Thu Sep 3 14:08:51 2009
Last Seen Thu Sep 3 14:10:20 2009
Local ID 725eeb90-824c-4e00-b0c5-3575cdf7d070
Line Numbers
Raw Audit Messages
node=springer.wildebeest.org type=AVC msg=audit(1251979820.974:270): avc:
denied { execmem } for pid=12251 comm="bz10078"
scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process
--
Summary: uprobe return probes causes selinux failures
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: uprobes
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: mjw at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10595
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
next reply other threads:[~2009-09-03 12:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 12:25 mjw at redhat dot com [this message]
2009-09-03 14:18 ` [Bug uprobes/10595] " mjw at redhat dot com
2009-09-03 16:25 ` [Bug uprobes/10595] uprobe " mjw at redhat dot com
2009-09-03 17:44 ` jkenisto at us dot ibm dot com
2009-09-03 20:13 ` mjw at redhat dot com
2009-09-04 11:09 ` mjw at redhat dot com
2009-09-04 11:58 ` srikar at linux dot vnet dot ibm dot com
2009-09-04 17:11 ` jkenisto at us dot ibm dot com
2009-09-04 17:25 ` mjw at redhat dot com
2009-09-04 18:08 ` jkenisto at us dot ibm dot com
2009-09-07 11:38 ` mjw at redhat dot com
2009-09-08 12:26 ` srikar at linux dot vnet dot ibm dot com
2009-09-10 15:50 ` fche at redhat dot com
2009-09-14 18:51 ` fche at redhat dot com
2009-09-14 19:27 ` mjw at redhat dot com
2009-09-14 19:51 ` mjw at redhat dot com
2009-09-17 10:27 ` mjw at redhat dot com
2009-09-17 13:14 ` mjw at redhat dot com
2009-09-17 15:53 ` fche at redhat dot com
2009-09-18 15:08 ` mjw at redhat dot com
2009-12-14 14:19 ` mjw at redhat dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090903122458.10595.mjw@redhat.com \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).