[uClibc] Bug in (probably) shm, cause: IPC patch of 2005.04.24

Peter S. Mazinger ps.m at gmx.net
Sat May 7 17:52:55 UTC 2005


Hello!

The patch that was added on 2005.04.14 (IPC_64) killed all apps that make 
use of shared memory.
I am using grsecurity patched kernels (tested both 2.4.30 and 2.6.11)

The apps: icewm, xfwm4, mozilla, xfdesktop, xfce4-session, xfce4-panel.

If the apps are rebuilt against the current uclibc, they trigger a stack 
smash protection in X (xorg-x11-6.8.2) in ProtShmAttach(). It is not 
relevant if X is rebuilt or not.
If I undo the above named patch, none of the apps trigger ssp in X, but 
fail themselves until they are rebuilt again against the non-IPC uclibc 
version.
I can't even tell what happens, my box hanged, only the ssp entry is in 
the logs.

As a side-note, speaking about the current state of uclibc:

Forced by the above bug I have rebuilt 312 apps against the current 
(2005.05.02) version of uclibc (w/o IPC patch).

It is poerforming really fine, thanks.

All the c++ stuff was built against uclibc++-svn, binutils-2.15.96.0.2 
and gcc-3.4.3. The build is based on gentoo, with additional patches 
to support uclibc better/in more apps. All the patches that were proposed 
in bugs (for gcc4, math, main moved to crt0.S) were used, the only feature 
not enabled (due to incompat) was moving fini.

Not solved issues I have found:
1. argument handling (if there are probably more than 4) fails, the 
ordering of args is relevant (bug opened: ex. rpm)
2. string handling has some trouble:
configure of some apps has
PACKAGE_STRING='abiword 2.2' like entry
after running configure it gets added to Makefile/GNUmakefile as
DEFS = -DPACKAGE_STRING=\"abiword\ 2.2\" # left out the others
if now make is run gcc/g++ misses the second '\' so 2.2 is not part of 
PACKAGE_STRING and fails.

The move of main to crt0.S produces 2 failures:
- subversion fails the tests (the app itself is ok)
- sysvinit: can't build init (but this is related to PIE creation, if I 
build it as ET_EXEC, it succeeds, it seems a combination of relocation 
-GOTOFF- and main not supported by linker)

Thanks for the good work,

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list