Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 22 May 2020 17:56:50 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: [PATCH] (series) Fix serious missing synchronization bug between
 internal locks and threads_minus_1 1->0 transition

On Fri, May 22, 2020 at 12:21:42PM -0400, Rich Felker wrote:
> Anyway, first fix coming soon. This will be important for distros to
> pick up.

And here's a patch series.

I found and fixed a second bug, independent of the first, where
threads_minus_1 was being decremented too early and causing dlerror
cleanup (__dl_thread_cleanup) to skip locking.

I also have a solution for returning to skipping locks after the
process becomes single-threaded again.

See attached series.

View attachment "0001-reorder-thread-list-unlink-in-pthread_exit-after-all.patch" of type "text/plain" (2224 bytes)

View attachment "0002-don-t-use-libc.threads_minus_1-as-relaxed-atomic-for.patch" of type "text/plain" (2803 bytes)

View attachment "0003-cut-down-size-of-some-libc-struct-members.patch" of type "text/plain" (739 bytes)

View attachment "0004-restore-lock-skipping-for-processes-that-return-to-s.patch" of type "text/plain" (3619 bytes)

Powered by blists - more mailing lists

Your e-mail address:

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