llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.69k stars 11.87k forks source link

libasan: prctl interceptor uses wrong type for calling prctl implementation #80497

Open fweimer-rh opened 8 months ago

fweimer-rh commented 8 months ago

The prctl function in glibc is variadic, yet libasan calls it with a fixed argument list. This causes stack corruption on powerpc64le-linux-gnu with glibc 2.32 or later because the prctl implementation assumes that the parameter save area has been set up by the caller, which only happens on variadic calls.

References:

I don't know if I can get the ABI change reverted on the glibc side.

fweimer-rh commented 8 months ago

This has been worked around in glibc: