[CRIU] [PATCH 5/6] restorer: Workaround ASan false-positives after clone().

Dmitry Safonov dsafonov at virtuozzo.com
Mon Feb 6 02:59:20 PST 2017


On 02/06/2017 01:14 PM, Andrey Ryabinin wrote:
> ASan doesn't play nicely with clone if we use current stack for
> child task. ASan puts local variables on the fake stack
> to catch use-after-return bug:
> 	https://github.com/google/sanitizers/wiki/AddressSanitizerUseAfterReturn#algorithm
>
> So it's become easy to overflow this fake stack frame in cloned child.
> We need a real stack for clone().
>
> To workaround this we add clone_noasan() not-instrumented wrapper for
> clone(). Unfortunately we can't use __attrbute__((no_sanitize_addresss))
> for this because of bug in GCC > 6:
> 	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69863
>
> So the only way is to put this wrapper in separate non-instrumented file.
>
> Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>

Reviewed-by: Dmitry Safonov <dsafonov at virtuozzo.com>


More information about the CRIU mailing list