First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 91921
Alias:
Product:
Component:
Status: RESOLVED
Resolution: TEST-REQUEST
Assigned To: The Gentoo Linux Hardened Team <hardened@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Daniel Thaler <daniel@dthaler.de>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
setfiles-patched.c My setfiles.c with patch + printf text/plain Daniel Thaler 2005-05-08 10:37 0000 13.61 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 91921 depends on: Show dependency tree
Bug 91921 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-05-08 10:35 0000
I'm building a system with the
/usr/portage/profiles/selinux/2005.1/x86/hardened profile.
'emerge system' installs policycoreutils-1.22; every emerge after that fails
because setfiles segfaults during the qmerge phase.

After some googling i manually compiled setfiles with the patch at
http://marc.theaimsgroup.com/?l=selinux&m=111292011814641&w=2, but it did not
fix the problem.

After adding some printf statements, I determined that setfiles crashes in the
call to matchpathcon_filespec_destroy(), which is located in libselinux.

(BTW: I was unable to use gdb, becaue I could not set breakpoints. Is there a
trick to it that I don't know about, or should I file a bugreport for that
too?)

------- Comment #1 From Daniel Thaler 2005-05-08 10:37:06 0000 -------
Created an attachment (id=58369) [edit]
My setfiles.c with patch + printf

------- Comment #2 From Chris PeBenito 2005-05-08 16:04:13 0000 -------
Please try libselinux-1.22-r1, I believe it has the fix for your problem.  As
for debugging, you need to enable the gdb debugging in CFLAGS, and have portage
not strip your binaries and librares.

------- Comment #3 From Daniel Thaler 2005-05-08 17:05:12 0000 -------
It works now. Thank you!

As for debugging, I compiled the program manually with CFLAGS="-g". When setting breakpoints I got this type of error:

Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x702: Input/output error.

Anyway, I was wondering wether this is some weird side-effect of selinux/hardened or a genuine bug.

------- Comment #4 From solar 2005-05-08 17:15:59 0000 -------
Re comment #3

To properly debug something with USE=hardened enabled try the following
# CFLAGS='-g3 -ggdb -fno-stack-protector -nopie' FEATURES='nostrip' emerge buggy
$ paxctl -permsx `which buggy` ; (you may need to force selinux to this step?)
$ gdb `which buggy` 

gdb> run
gdb> backtrace full
gdb> info regs
etc.. good luck.

First Last Prev Next    No search results available      Search page      Enter new bug