dlopen in combination with libselinux and libGL crashes

Bug #325302 reported by Wim
4
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm not sure I can pinpoint this bug to one package. This is also the reason why I submit it here instead of at the package owner bug tool.

The problem occurs for .so files linked with libselinux and libGL. When you dlopen this .so file everything is fine, until the program exits, then libselinux gives a SIGSEGV. If you do not link libGL, or if you swap the order, everything is fine. The .so file itself does not need to do anything with these libraries.

I have attached a simple testcase to show this problem.

1)
Description: Ubuntu 8.10
Release: 8.10
2)
libselinux1 2.0.65-2
libgl1-mesa-dev 7.2-1ubuntu2
libc6-dev 2.8~20080505-0ubuntu8 (dlopen)
3)
I expect it not to crash
4)
==1979== Invalid read of size 4
==1979== at 0x462D974: (within /lib/libselinux.so.1)
==1979== by 0x4626B8D: (within /lib/libselinux.so.1)
==1979== by 0x461F1D7: (within /lib/libselinux.so.1)
==1979== by 0x462F34F: (within /lib/libselinux.so.1)
==1979== by 0x400E152: (within /lib/ld-2.8.90.so)
==1979== by 0x4073D68: exit (in /lib/tls/i686/cmov/libc-2.8.90.so)
==1979== by 0x405B68C: (below main) (in /lib/tls/i686/cmov/libc-2.8.90.so)
==1979== Address 0x40 is not stack'd, malloc'd or (recently) free'd
==1979==
==1979== Process terminating with default action of signal 11 (SIGSEGV)
==1979== Access not within mapped region at address 0x40
==1979== at 0x462D974: (within /lib/libselinux.so.1)
==1979== by 0x4626B8D: (within /lib/libselinux.so.1)
==1979== by 0x461F1D7: (within /lib/libselinux.so.1)
==1979== by 0x462F34F: (within /lib/libselinux.so.1)
==1979== by 0x400E152: (within /lib/ld-2.8.90.so)
==1979== by 0x4073D68: exit (in /lib/tls/i686/cmov/libc-2.8.90.so)
==1979== by 0x405B68C: (below main) (in /lib/tls/i686/cmov/libc-2.8.90.so)

Revision history for this message
Wim (wim-yedema) wrote :
shankao (shankao)
affects: ubuntu → glibc (Ubuntu)
Revision history for this message
Wim (wim-yedema) wrote :

This bug has been "New" and status Undecided for over 2 years now. Maybe it should be marked as "We're not going to fix it"?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.