public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug nptl/12889] Race condition in pthread_kill
Date: Thu, 23 Sep 2021 08:54:35 +0000	[thread overview]
Message-ID: <bug-12889-131-MXjhIF4KG0@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-12889-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=12889

--- Comment #10 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2849e2f53311b66853cb5159b64cba2bddbfb854

commit 2849e2f53311b66853cb5159b64cba2bddbfb854
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Sep 23 09:55:54 2021 +0200

    nptl: Avoid setxid deadlock with blocked signals in thread exit [BZ #28361]

    As part of the fix for bug 12889, signals are blocked during
    thread exit, so that application code cannot run on the thread that
    is about to exit.  This would cause problems if the application
    expected signals to be delivered after the signal handler revealed
    the thread to still exist, despite pthread_kill can no longer be used
    to send signals to it.  However, glibc internally uses the SIGSETXID
    signal in a way that is incompatible with signal blocking, due to the
    way the setxid handshake delays thread exit until the setxid operation
    has completed.  With a blocked SIGSETXID, the handshake can never
    complete, causing a deadlock.

    As a band-aid, restore the previous handshake protocol by not blocking
    SIGSETXID during thread exit.

    The new test sysdeps/pthread/tst-pthread-setuid-loop.c is based on
    a downstream test by Martin Osvald.

    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-09-23  8:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15  0:39 [Bug nptl/12889] New: " bugdal at aerifal dot cx
2011-06-18 23:35 ` [Bug nptl/12889] " ppluzhnikov at google dot com
2012-04-29  3:04 ` bugdal at aerifal dot cx
2014-06-27 13:11 ` fweimer at redhat dot com
2015-10-31 12:08 ` fweimer at redhat dot com
2015-10-31 12:37 ` schwab@linux-m68k.org
2015-10-31 20:27 ` bugdal at aerifal dot cx
2021-08-17  6:25 ` fweimer at redhat dot com
2021-08-17 12:01 ` fweimer at redhat dot com
2021-08-17 12:44 ` fweimer at redhat dot com
2021-08-17 13:52 ` fweimer at redhat dot com
2021-09-13 10:41 ` cvs-commit at gcc dot gnu.org
2021-09-13 10:46 ` fweimer at redhat dot com
2021-09-13 12:20 ` cvs-commit at gcc dot gnu.org
2021-09-21 13:05 ` fweimer at redhat dot com
2021-09-23  8:54 ` cvs-commit at gcc dot gnu.org [this message]
2021-09-23  9:04 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12889-131-MXjhIF4KG0@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).