On 03/08/2011 02:05 PM, Mike Frysinger wrote:
> On Tue, Mar 8, 2011 at 1:40 PM, Alex Efros wrote:
>> On Fri, Mar 06, 2009 at 03:25:16PM -0800, Ned Ludd wrote:
>>>> On Fri, Mar 06, 2009 at 11:12:59PM +0200, [email protected] wrote:
>>>>> ah crap, i know what it is. it's a several years old glibc bug where 
>>>>> someone
>>>>> put a certain variable into the RELRO segment but forgot that it'll be 
>>>>> written
>>>>> to later when a library with RWE GNU_STACK is loaded. the workaround is
>>>>> to find that library (just extract them from strace, probably it'll be
>>>>> pari's library) and run execstack -c on it.
>>>>
>>>> I don't have execstack command. Looks like it belong to prelink package,
>>>> but http://www.gentoo.org/doc/en/prelink-howto.xml states it's
>>>> incompatible with hardened. Because of this I decide to compile it
>>>> manually, just to get execstack command:
>>>>
>>>> # emerge -f prelink
>>>> # cd /usr/src
>>>> # tar xjvf /usr/portage-distfiles/prelink-20071009.tar.bz2
>>>> # cd prelink
>>>> # ./configure && make
>>>>
>>>> Now I tried your workaround:
>>>>
>>>> # /usr/src/prelink/src/execstack -c 
>>>> /usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/Math/Pari/Pari.so
>>>> # /usr/src/prelink/src/execstack -c 
>>>> /usr/local/ioncube/ioncube_loader_lin_5.2.so
>>>> # /usr/src/prelink/src/execstack -c 
>>>> /usr/local/Zend/lib/ZendExtensionManager.so
>>>> # /usr/src/prelink/src/execstack -c 
>>>> /usr/local/Zend/lib/ZendExtensionManager_TS.so
>>>> # /usr/src/prelink/src/execstack -c 
>>>> /usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ZendOptimizer.so
>>>>
>>>> and it works!!
>>>>
>>>> Is this issue will be fixed in next stable hardened-sources?
>>>
>>> FYI.. PaX Team maintains the PaX kernel and has little control over what
>>> fixes go into the "next" hardened-sources. Also seems to me a little
>>> strange that the PaX Team would have to put a work-around in the kernel
>>> for a bug in glibc.. Seems like glibc should be fixed vs the kernel.
>>
>> 2 years later… Just updated system, bug still exists, and I still have to
>> use execstack workaround for zendoptimizer and ioncube.
> 
> like they said, this doesnt seem to be a bug in the kernel, so the pax
> source arent going to be changing
> 
> if there's a bug in glibc, an actual bug in bugs.g.o needs to be
> opened with real details/patches.  otherwise, nothing is going to
> change.
> -mike

Nothing to say that Mike hasn't already said.  pipacs knows about this
but what can he do?  Good luck with upstream glibc.  Next time I speak
with pipacs I can bring it up, see if anything is changing.  I doubt it.

Take a look at [1] for a good laugh.


Ref:

[1] http://sourceware.org/bugzilla/show_bug.cgi?id=12492

-- 
Anthony G. Basile, Ph.D.
Gentoo Developer

Reply via email to