All of lore.kernel.org
 help / color / mirror / Atom feed
* xine_init() causes segfault in libselinux
@ 2009-03-30  0:01 Vikram Noel Ambrose
  2009-03-30 11:46 ` Daniel J Walsh
  2009-04-02 20:12 ` Joshua Brindle
  0 siblings, 2 replies; 3+ messages in thread
From: Vikram Noel Ambrose @ 2009-03-30  0:01 UTC (permalink / raw)
  To: selinux

Hello Everyone,

I've managed to find a repeatable segfault scenario with some very basic 
libxine code.

libxine if anyone doesnt know is a very popular audio backend for many 
userspace applications in KDE and Gnome.

Here is the code: http://en.pastebin.ca/1376316

The code basically opens a file stream with no Audio or Video drivers, 
and just reads the meta data from the file (title information), and then 
quits.

A gdb backtrace and valgrind have led me to believe there is a fault in 
libselinux.

Though this could very possibly be a fault in libxine, I'd have thought 
libselinux would be more resilient to such issues. Especially since 
glibc didnt complain.

If you would like to run this test code, simply install xine-lib-devel 
and then compile the test program.

$ gcc -lxine -g test.c
$ ./a.out

I'm using an up-to-date FC10 x86_64 installation. 
2.6.27.19-170.2.35.fc10.x86_64


Vikram


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xine_init() causes segfault in libselinux
  2009-03-30  0:01 xine_init() causes segfault in libselinux Vikram Noel Ambrose
@ 2009-03-30 11:46 ` Daniel J Walsh
  2009-04-02 20:12 ` Joshua Brindle
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel J Walsh @ 2009-03-30 11:46 UTC (permalink / raw)
  To: Vikram Noel Ambrose; +Cc: selinux

On 03/29/2009 08:01 PM, Vikram Noel Ambrose wrote:
> Hello Everyone,
>
> I've managed to find a repeatable segfault scenario with some very basic
> libxine code.
>
> libxine if anyone doesnt know is a very popular audio backend for many
> userspace applications in KDE and Gnome.
>
> Here is the code: http://en.pastebin.ca/1376316
>
> The code basically opens a file stream with no Audio or Video drivers,
> and just reads the meta data from the file (title information), and then
> quits.
>
> A gdb backtrace and valgrind have led me to believe there is a fault in
> libselinux.
>
> Though this could very possibly be a fault in libxine, I'd have thought
> libselinux would be more resilient to such issues. Especially since
> glibc didnt complain.
>
> If you would like to run this test code, simply install xine-lib-devel
> and then compile the test program.
>
> $ gcc -lxine -g test.c
> $ ./a.out
>
> I'm using an up-to-date FC10 x86_64 installation.
> 2.6.27.19-170.2.35.fc10.x86_64
>
>
> Vikram
>
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov
> with
> the words "unsubscribe selinux" without quotes as the message.
This is most likely a problem with libxine.  SELinux uses a 
constructor/destructor when the library is loaded that allocates and 
frees memory.  If the app that loads SELinux corrupts this memory for 
some reason, the SELinux destructor will segfault.  Similar bugs have 
been reported against libselinux, and all have been the fault of the 
calling app/library so far.

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xine_init() causes segfault in libselinux
  2009-03-30  0:01 xine_init() causes segfault in libselinux Vikram Noel Ambrose
  2009-03-30 11:46 ` Daniel J Walsh
@ 2009-04-02 20:12 ` Joshua Brindle
  1 sibling, 0 replies; 3+ messages in thread
From: Joshua Brindle @ 2009-04-02 20:12 UTC (permalink / raw)
  To: Vikram Noel Ambrose; +Cc: selinux

Vikram Noel Ambrose wrote:
> Hello Everyone,
> 
> I've managed to find a repeatable segfault scenario with some very basic 
> libxine code.
> 
> libxine if anyone doesnt know is a very popular audio backend for many 
> userspace applications in KDE and Gnome.
> 
> Here is the code: http://en.pastebin.ca/1376316
> 
> The code basically opens a file stream with no Audio or Video drivers, 
> and just reads the meta data from the file (title information), and then 
> quits.
> 
> A gdb backtrace and valgrind have led me to believe there is a fault in 
> libselinux.
> 
> Though this could very possibly be a fault in libxine, I'd have thought 
> libselinux would be more resilient to such issues. Especially since 
> glibc didnt complain.
> 
> If you would like to run this test code, simply install xine-lib-devel 
> and then compile the test program.
> 
> $ gcc -lxine -g test.c
> $ ./a.out
> 
> I'm using an up-to-date FC10 x86_64 installation. 
> 2.6.27.19-170.2.35.fc10.x86_64
> 
> 

I can't reproduce this on an x86 F10 install with either the latest libselinux 
or trunk libselinux. Can you try installing a libselinux from trunk with DEBUG=1 
make flag so the backtrace will give more information?

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-02 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30  0:01 xine_init() causes segfault in libselinux Vikram Noel Ambrose
2009-03-30 11:46 ` Daniel J Walsh
2009-04-02 20:12 ` Joshua Brindle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.