Bug 177121 - libm.so built with writable text segment
Summary: libm.so built with writable text segment
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-06 15:03 UTC by Steve Grubb
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version: 2.3.90-30
Clone Of:
Environment:
Last Closed: 2006-01-10 01:50:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Grubb 2006-01-06 15:03:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
Gawk has suddenly started causing avc messages. They are regarding execmem 
( background info is here: http://people.redhat.com/drepper/selinux-mem.html ). This is the avc message:

type=SYSCALL msg=audit(01/06/2006 09:23:07.788:36) : arch=x86_64 syscall=mmap success=yes exit=-1429430272(Unknown error 1429430272) a0=0 a1=1810b8 a2=7 a3=802 items=0 pid=1912 auid=unknown(4294967295) uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) comm=awk exe=/bin/gawk subj=system_u:system_r:initrc_t:s0
type=AVC msg=audit(01/06/2006 09:23:07.788:36) : avc:  granted  { execmem } for  pid=1912 comm=awk scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=process


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

How reproducible:
Always

Steps to Reproduce:
1. You can simply do "ausearch -m avc -x gawk -i | less" and you should see them on a rawhide machine. Init scripts runs gawk so you don't need any special setup to generate these.

Additional info:

Comment 1 Steve Grubb 2006-01-08 14:22:00 UTC
I ran "./gawk" while tailing /var/log/audit/audit.log and see the avc violation.
I ran strace and found the following:

open("/lib64/libm.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300<\0\0"..., 832) =
832fstat(3, {st_mode=S_IFREG|0755, st_size=608488, ...}) = 0
mmap(NULL, 1577144, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x2aaaaacca000
mprotect(0x2aaaaad4b000, 1044480, PROT_NONE) = 0
mmap(0x2aaaaae4a000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x80000) = 0x2aaaaae4a000
close(3)                                = 0

This may be coming from the dynamic linker. Ulrich?

Comment 2 Roland McGrath 2006-01-09 22:58:19 UTC
libm is built with RWE text segment on ppc64.
Maybe a glibc bug or a tools bug.


Comment 3 Roland McGrath 2006-01-10 01:50:29 UTC
Today's glibc build fixes the bug.


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