FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora SELinux Support

 
 
LinkBack Thread Tools
 
Old 09-07-2011, 09:41 AM
Paul Howarth
 
Default matchpathcon crashing in mock chroot

I'm running matchpathcon as part of the libssh2 build to set the file
context of a test script appropriately such that an instance of an
openssh server that's run as part of the test suite transitions
correctly to sshd_t. This has worked OK in the past but I'm now finding
that on my F-15 builder matchpathcon is crashing when doing:

/usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd

gdb doesn't seem to be much help:

[mockbuild@zion ~]$ /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd
Segmentation fault (core dumped)
[mockbuild@zion ~]$ gdb /usr/sbin/matchpathcon
GNU gdb (GDB) Fedora (7.3.50.20110722-6.fc16)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/matchpathcon...Reading symbols from /usr/lib/debug/sbin/matchpathcon.debug...done.
done.
(gdb) run -n /etc/rc.d/init.d/sshd
Starting program: /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd

Program received signal SIGSEGV, Segmentation fault.
__strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
) at /usr/include/bits/string2.h:1179
1179 while (*__s == __sep)
(gdb) bt
#0 __strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
) at /usr/include/bits/string2.h:1179
#1 init (rec=0x602010, opts=0x7ffff7ff3718, n=<optimized out>) at label_file.c:440
#2 0x00007ffff7bc4b3d in selabel_open (backend=0, opts=0x7ffff7ff3718, nopts=5) at label.c:165
#3 0x00007ffff7bc3e16 in matchpathcon_init_prefix_internal (path=0x0, subset=0x0) at matchpathcon.c:321
#4 0x00007ffff7bc40a9 in matchpathcon (path=0x7fffffffe82a "/etc/rc.d/init.d/sshd", mode=0, con=0x7fffffffe418) at matchpathcon.c:406
#5 0x0000000000400fe7 in printmatchpathcon (path=0x7fffffffe82a "/etc/rc.d/init.d/sshd", header=0, mode=<optimized out>) at matchpathcon.c:27
#6 0x0000000000400d41 in main (argc=<optimized out>, argv=<optimized out>) at matchpathcon.c:156
(gdb)

I was getting an AVC earlier too, fixed by:

allow setfiles_t sysfs_t:filesystem getattr;

but fixing that didn't prevent the crash.

This is with an F-15 host and Rawhide x86_64 target, libselinux-2.1.5-2.fc17.

Any suggestions?

Paul.
--
selinux mailing list
selinux@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/selinux
 
Old 09-07-2011, 01:20 PM
Tom London
 
Default matchpathcon crashing in mock chroot

On Wed, Sep 7, 2011 at 2:41 AM, Paul Howarth <paul@city-fan.org> wrote:
> I'm running matchpathcon as part of the libssh2 build to set the file
> context of a test script appropriately such that an instance of an
> openssh server that's run as part of the test suite transitions
> correctly to sshd_t. This has worked OK in the past but I'm now finding
> that on my F-15 builder matchpathcon is crashing when doing:
>
> /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd
>
> gdb doesn't seem to be much help:
>
> [mockbuild@zion ~]$ /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd
> Segmentation fault (core dumped)
> [mockbuild@zion ~]$ gdb /usr/sbin/matchpathcon
> GNU gdb (GDB) Fedora (7.3.50.20110722-6.fc16)
> Copyright (C) 2011 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. *Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/sbin/matchpathcon...Reading symbols from /usr/lib/debug/sbin/matchpathcon.debug...done.
> done.
> (gdb) run *-n /etc/rc.d/init.d/sshd
> Starting program: /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd
>
> Program received signal SIGSEGV, Segmentation fault.
> __strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
> ) at /usr/include/bits/string2.h:1179
> 1179 * * *while (*__s == __sep)
> (gdb) bt
> #0 *__strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
> ) at /usr/include/bits/string2.h:1179
> #1 *init (rec=0x602010, opts=0x7ffff7ff3718, n=<optimized out>) at label_file.c:440
> #2 *0x00007ffff7bc4b3d in selabel_open (backend=0, opts=0x7ffff7ff3718, nopts=5) at label.c:165
> #3 *0x00007ffff7bc3e16 in matchpathcon_init_prefix_internal (path=0x0, subset=0x0) at matchpathcon.c:321
> #4 *0x00007ffff7bc40a9 in matchpathcon (path=0x7fffffffe82a "/etc/rc.d/init.d/sshd", mode=0, con=0x7fffffffe418) at matchpathcon.c:406
> #5 *0x0000000000400fe7 in printmatchpathcon (path=0x7fffffffe82a "/etc/rc.d/init.d/sshd", header=0, mode=<optimized out>) at matchpathcon.c:27
> #6 *0x0000000000400d41 in main (argc=<optimized out>, argv=<optimized out>) at matchpathcon.c:156
> (gdb)
>
> I was getting an AVC earlier too, fixed by:
>
> allow setfiles_t sysfs_t:filesystem getattr;
>
> but fixing that didn't prevent the crash.
>
> This is with an F-15 host and Rawhide x86_64 target, libselinux-2.1.5-2.fc17.
>
> Any suggestions?
>
> Paul.
> --

Updating to libselinux-2.1.5-3.fc17.x86_64 fixes this segfault for me.


tom
--
Tom London
--
selinux mailing list
selinux@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/selinux
 
Old 09-07-2011, 01:37 PM
Daniel J Walsh
 
Default matchpathcon crashing in mock chroot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/07/2011 05:41 AM, Paul Howarth wrote:
> I'm running matchpathcon as part of the libssh2 build to set the file
> context of a test script appropriately such that an instance of an
> openssh server that's run as part of the test suite transitions
> correctly to sshd_t. This has worked OK in the past but I'm now finding
> that on my F-15 builder matchpathcon is crashing when doing:
>
> /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd
>
> gdb doesn't seem to be much help:
>
> [mockbuild@zion ~]$ /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd
> Segmentation fault (core dumped)
> [mockbuild@zion ~]$ gdb /usr/sbin/matchpathcon
> GNU gdb (GDB) Fedora (7.3.50.20110722-6.fc16)
> Copyright (C) 2011 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/sbin/matchpathcon...Reading symbols from /usr/lib/debug/sbin/matchpathcon.debug...done.
> done.
> (gdb) run -n /etc/rc.d/init.d/sshd
> Starting program: /usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd
>
> Program received signal SIGSEGV, Segmentation fault.
> __strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
> ) at /usr/include/bits/string2.h:1179
> 1179 while (*__s == __sep)
> (gdb) bt
> #0 __strtok_r_1c (__nextp=read_sleb128: Corrupted DWARF expression.
> ) at /usr/include/bits/string2.h:1179
> #1 init (rec=0x602010, opts=0x7ffff7ff3718, n=<optimized out>) at label_file.c:440
> #2 0x00007ffff7bc4b3d in selabel_open (backend=0, opts=0x7ffff7ff3718, nopts=5) at label.c:165
> #3 0x00007ffff7bc3e16 in matchpathcon_init_prefix_internal (path=0x0, subset=0x0) at matchpathcon.c:321
> #4 0x00007ffff7bc40a9 in matchpathcon (path=0x7fffffffe82a "/etc/rc.d/init.d/sshd", mode=0, con=0x7fffffffe418) at matchpathcon.c:406
> #5 0x0000000000400fe7 in printmatchpathcon (path=0x7fffffffe82a "/etc/rc.d/init.d/sshd", header=0, mode=<optimized out>) at matchpathcon.c:27
> #6 0x0000000000400d41 in main (argc=<optimized out>, argv=<optimized out>) at matchpathcon.c:156
> (gdb)
>
> I was getting an AVC earlier too, fixed by:
>
> allow setfiles_t sysfs_t:filesystem getattr;
>
> but fixing that didn't prevent the crash.
>
> This is with an F-15 host and Rawhide x86_64 target, libselinux-2.1.5-2.fc17.
>
> Any suggestions?
>
> Paul.
> --
> selinux mailing list
> selinux@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/selinux
>
>

Grab libselinux-2.1.5-3.fc17 out of koji, should fix the problem.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5nc5EACgkQrlYvE4MpobMDGACfX3e4rGvHNW F/pY37hrxHimhu
b7EAn146ezBALAn6ypC060zzt2wP2ERI
=64AQ
-----END PGP SIGNATURE-----
--
selinux mailing list
selinux@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/selinux
 

Thread Tools




All times are GMT. The time now is 01:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org