Incorrect IFUNC use in libpthread for fork, vfork wrapper [BZ #19861]

Florian Weimer fweimer@redhat.com
Wed Mar 30 13:19:00 GMT 2016


The IFUNC use is incorrect because you cannot assume that some other
symbol has been relocated, and the current implementation sometimes
returns an unrelocated address.  (The bug is about vfork, but I'm sure
fork has the same issue.)

Is there a reliable test case which exposes this problem?  I made the
vfork wrapper in libpthread a non-tail-call, fixed up the nptl vfork
tests to actually call the wrapper (which I assume they currently don't
due to the compat symbol), and still didn't get any crash.  I even tried
to add a bit of extra work in the child, to make sure that the stack is
overwritten (but downwards only, obviously).

Any ideas?

Florian



More information about the Libc-alpha mailing list