public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/14782] New: system() wrongly enables asynchronous cancellation
@ 2012-10-29  1:12 bugdal at aerifal dot cx
  2012-10-29  3:26 ` [Bug libc/14782] " cat at vv dot carleton.ca
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugdal at aerifal dot cx @ 2012-10-29  1:12 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14782

             Bug #: 14782
           Summary: system() wrongly enables asynchronous cancellation
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: bugdal@aerifal.cx
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


In sysdeps/posix/system.c, __libc_system function wrongly enables asynchronous
cancellation around the call to do_system, which in turn performs many
operations which are not async-cancel-safe such as obtaining locks and changing
signal dispositions. Thus, cancelling a thread that is calling system() can
lead to corruption of the internal state.

There is no purpose to enabling asynchronous cancellation; the only call in
do_system() which does not return immediately is waitpid, and waitpid is a
cancellation point, so normal deferred cancellation will yield the correct
behavior.

Removing the unneeded and harmful use of asynchronous cancellation state also
eliminates the need for the clone() hack in lines 27-38 of
sysdeps/unix/sysv/linux/system.c.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/14782] system() wrongly enables asynchronous cancellation
  2012-10-29  1:12 [Bug libc/14782] New: system() wrongly enables asynchronous cancellation bugdal at aerifal dot cx
@ 2012-10-29  3:26 ` cat at vv dot carleton.ca
  2014-01-10 20:46 ` carlos at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cat at vv dot carleton.ca @ 2012-10-29  3:26 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14782

Catalin Patulea <cat at vv dot carleton.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cat at vv dot carleton.ca

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/14782] system() wrongly enables asynchronous cancellation
  2012-10-29  1:12 [Bug libc/14782] New: system() wrongly enables asynchronous cancellation bugdal at aerifal dot cx
  2012-10-29  3:26 ` [Bug libc/14782] " cat at vv dot carleton.ca
@ 2014-01-10 20:46 ` carlos at redhat dot com
  2014-01-15 17:42 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: carlos at redhat dot com @ 2014-01-10 20:46 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com
   Target Milestone|---                         |2.20

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/14782] system() wrongly enables asynchronous cancellation
  2012-10-29  1:12 [Bug libc/14782] New: system() wrongly enables asynchronous cancellation bugdal at aerifal dot cx
  2012-10-29  3:26 ` [Bug libc/14782] " cat at vv dot carleton.ca
  2014-01-10 20:46 ` carlos at redhat dot com
@ 2014-01-15 17:42 ` cvs-commit at gcc dot gnu.org
  2014-01-18 15:02 ` cvs-commit at gcc dot gnu.org
  2014-06-13 10:12 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-01-15 17:42 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14782

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  c4dd57c300aa05ab2f957d571c321237a58d0368 (commit)
      from  7beb48cbb77ef32135a07b429838521a0c181377 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c4dd57c300aa05ab2f957d571c321237a58d0368

commit c4dd57c300aa05ab2f957d571c321237a58d0368
Author: Ondřej Bílka <neleai@seznam.cz>
Date:   Tue Jan 14 16:07:50 2014 +0100

    Do not enable asynchronous cancellation in system. Fixes bug 14782.

    We needlessly enabled thread cancellation before it was necessary. As
    only call that needs to be guarded is waitpid which is cancellation
    point we could remove cancellation altogether.

-----------------------------------------------------------------------

Summary of changes:
 NEWS                   |   28 ++++++++++++++--------------
 sysdeps/posix/system.c |   11 +----------
 2 files changed, 15 insertions(+), 24 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-20840-listarch-glibc-bugs=sources.redhat.com@sourceware.org Wed Jan 15 17:44:06 2014
Return-Path: <glibc-bugs-return-20840-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 11578 invoked by alias); 15 Jan 2014 17:44:05 -0000
Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <glibc-bugs.sourceware.org>
List-Subscribe: <mailto:glibc-bugs-subscribe@sourceware.org>
List-Post: <mailto:glibc-bugs@sourceware.org>
List-Help: <mailto:glibc-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: glibc-bugs-owner@sourceware.org
Delivered-To: mailing list glibc-bugs@sourceware.org
Received: (qmail 11148 invoked by uid 48); 15 Jan 2014 17:44:01 -0000
From: "neleai at seznam dot cz" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/14782] system() wrongly enables asynchronous cancellation
Date: Wed, 15 Jan 2014 17:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: libc
X-Bugzilla-Version: unspecified
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: neleai at seznam dot cz
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: 2.20
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution
Message-ID: <bug-14782-131-P3U2YH9PZN@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-14782-131@http.sourceware.org/bugzilla/>
References: <bug-14782-131@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg00241.txt.bz2
Content-length: 572

https://sourceware.org/bugzilla/show_bug.cgi?id\x14782

Ondrej Bilka <neleai at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |neleai at seznam dot cz
         Resolution|---                         |FIXED

--- Comment #2 from Ondrej Bilka <neleai at seznam dot cz> ---
Fixed.

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/14782] system() wrongly enables asynchronous cancellation
  2012-10-29  1:12 [Bug libc/14782] New: system() wrongly enables asynchronous cancellation bugdal at aerifal dot cx
                   ` (2 preceding siblings ...)
  2014-01-15 17:42 ` cvs-commit at gcc dot gnu.org
@ 2014-01-18 15:02 ` cvs-commit at gcc dot gnu.org
  2014-06-13 10:12 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-01-18 15:02 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14782

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2145f8b51df7b1bf670c48be7cb19eadb65b4247 (commit)
      from  6e077ee5c35432fec1780d3c7aa0034302b63949 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2145f8b51df7b1bf670c48be7cb19eadb65b4247

commit 2145f8b51df7b1bf670c48be7cb19eadb65b4247
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jan 18 06:58:36 2014 -0800

    Don't check asynchronous cancellation on system

    Since asynchronous cancellation was removed from system by

    commit c4dd57c300aa05ab2f957d571c321237a58d0368
    Author: Ondřej Bílka <neleai@seznam.cz>
    Date:   Tue Jan 14 16:07:50 2014 +0100

        Do not enable asynchronous cancellation in system. Fixes bug 14782.

        We needlessly enabled thread cancellation before it was necessary.
    As
        only call that needs to be guarded is waitpid which is cancellation
        point we could remove cancellation altogether.

    we shouldn't check asynchronous cancellation on system.

        [BZ #14782]
        * tst-cancel-wrappers.sh: Remove system.

-----------------------------------------------------------------------

Summary of changes:
 nptl/ChangeLog              |    5 +++++
 nptl/tst-cancel-wrappers.sh |    1 -
 2 files changed, 5 insertions(+), 1 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-20886-listarch-glibc-bugs=sources.redhat.com@sourceware.org Sat Jan 18 23:39:11 2014
Return-Path: <glibc-bugs-return-20886-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 11689 invoked by alias); 18 Jan 2014 23:39:11 -0000
Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <glibc-bugs.sourceware.org>
List-Subscribe: <mailto:glibc-bugs-subscribe@sourceware.org>
List-Post: <mailto:glibc-bugs@sourceware.org>
List-Help: <mailto:glibc-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: glibc-bugs-owner@sourceware.org
Delivered-To: mailing list glibc-bugs@sourceware.org
Received: (qmail 11657 invoked by uid 48); 18 Jan 2014 23:39:07 -0000
From: "evan@coeus-group.com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/14092] Support C11 threads
Date: Sat, 18 Jan 2014 23:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: libc
X-Bugzilla-Version: 2.15
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: evan@coeus-group.com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-14092-131-JiPTL6vJXz@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-14092-131@http.sourceware.org/bugzilla/>
References: <bug-14092-131@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg00287.txt.bz2
Content-length: 383

https://sourceware.org/bugzilla/show_bug.cgi?id\x14092

Evan Nemerson <evan@coeus-group.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |evan@coeus-group.com

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/14782] system() wrongly enables asynchronous cancellation
  2012-10-29  1:12 [Bug libc/14782] New: system() wrongly enables asynchronous cancellation bugdal at aerifal dot cx
                   ` (3 preceding siblings ...)
  2014-01-18 15:02 ` cvs-commit at gcc dot gnu.org
@ 2014-06-13 10:12 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 10:12 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-13 10:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29  1:12 [Bug libc/14782] New: system() wrongly enables asynchronous cancellation bugdal at aerifal dot cx
2012-10-29  3:26 ` [Bug libc/14782] " cat at vv dot carleton.ca
2014-01-10 20:46 ` carlos at redhat dot com
2014-01-15 17:42 ` cvs-commit at gcc dot gnu.org
2014-01-18 15:02 ` cvs-commit at gcc dot gnu.org
2014-06-13 10:12 ` fweimer at redhat dot com

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).