Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 2 Apr 2016 04:22:49 +0800
From: Lance Chen <>
Subject: AS-safe change for multithreaded setxid breaks chroot() along with

Hello there,

I have been trying to run powerdns on Alpine Linux, which features musl,
without success. It turns out that the AS-safe strategy introduced in
the patch,
especially the use of reading /proc/self/task, causes the failure. The
failure condition is a combination of three features, pthread, chroot,
and set*id. After chroot()'ing to some directory, calling set*id() will
try to access /proc/self/task, and fail to find the directory in the new
root. I've created a minimal POC at

I understand how important it is to make set*id calls AS-safe, but there
might be a bunch of programs using set*id along with pthread and chroot.
(postfix could be one of them, I haven't take a deeper look at it though)
And I think it does not quite make sense to ask user not to use the
combination of the three features.

Does anyone have any possible fix for this? Or anyone know any WIP on
the Linux kernel to provide a truly atomic set*id syscall among threads?

Related thread: Fixing multithreaded set*id() AS-safety

Lance Chen

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.