public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug network/19074] New: Data race in _res_hconf_reorder_addrs
@ 2015-10-06 12:17 fweimer at redhat dot com
  2015-10-14 14:50 ` [Bug network/19074] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2015-10-06 12:17 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 19074
           Summary: Data race in _res_hconf_reorder_addrs
           Product: glibc
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: network
          Assignee: fweimer at redhat dot com
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
             Flags: security-

_res_hconf_reorder_addrs contains an instance of the incorrect double-checked
locking idiom:

  /* Number of interfaces.  */
  static int num_ifs = -1;
  /* We need to protect the dynamic buffer handling.  */
  __libc_lock_define_initialized (static, lock);
…
  if (num_ifs <= 0)
    {
…
      /* Get lock.  */
      __libc_lock_lock (lock);

      /* Recheck, somebody else might have done the work by now.  */
      if (num_ifs <= 0)
…
          num_ifs = new_num_ifs;
        }

      __libc_lock_unlock (lock);

num_ifs needs to be accessed with acquire loads and a release store.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-30041-listarch-glibc-bugs=sources.redhat.com@sourceware.org Tue Oct 06 12:17:48 2015
Return-Path: <glibc-bugs-return-30041-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 51393 invoked by alias); 6 Oct 2015 12:17:48 -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 51358 invoked by uid 48); 6 Oct 2015 12:17:44 -0000
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug network/19074] Data race in _res_hconf_reorder_addrs
Date: Tue, 06 Oct 2015 12:17:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: network
X-Bugzilla-Version: 2.23
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fweimer at redhat dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: fweimer at redhat dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags: security-
X-Bugzilla-Changed-Fields: bug_status
Message-ID: <bug-19074-131-Q8I2W0ERX1@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-19074-131@http.sourceware.org/bugzilla/>
References: <bug-19074-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: 2015-10/txt/msg00078.txt.bz2
Content-length: 377

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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


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

* [Bug network/19074] Data race in _res_hconf_reorder_addrs
  2015-10-06 12:17 [Bug network/19074] New: Data race in _res_hconf_reorder_addrs fweimer at redhat dot com
@ 2015-10-14 14:50 ` cvs-commit at gcc dot gnu.org
  2015-10-14 14:50 ` fweimer at redhat dot com
  2015-10-29 17:11 ` jsm28 at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-10-14 14:50 UTC (permalink / raw)
  To: glibc-bugs

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

--- 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  f463c7b1839e2df5da0cd1fb6fe197f982b68765 (commit)
      from  d95453ef5d9fccac44ab3d4a161d917e7ef6231f (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=f463c7b1839e2df5da0cd1fb6fe197f982b68765

commit f463c7b1839e2df5da0cd1fb6fe197f982b68765
Author: Florian Weimer <fweimer@redhat.com>
Date:   Wed Oct 14 16:19:24 2015 +0200

    Fix double-checked locking in _res_hconf_reorder_addrs [BZ #19074]

        [BZ #19074]
        * resolv/res_hconf.c (_res_hconf_reorder_addrs): Use atomics to
        load and store num_ifs.

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

Summary of changes:
 ChangeLog          |    6 ++++
 NEWS               |    5 ++-
 resolv/res_hconf.c |   70 ++++++++++++++++++++++++++++++++++++++++++++++------
 3 files changed, 71 insertions(+), 10 deletions(-)

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


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

* [Bug network/19074] Data race in _res_hconf_reorder_addrs
  2015-10-06 12:17 [Bug network/19074] New: Data race in _res_hconf_reorder_addrs fweimer at redhat dot com
  2015-10-14 14:50 ` [Bug network/19074] " cvs-commit at gcc dot gnu.org
@ 2015-10-14 14:50 ` fweimer at redhat dot com
  2015-10-29 17:11 ` jsm28 at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2015-10-14 14:50 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Fixed in 2.23.

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


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

* [Bug network/19074] Data race in _res_hconf_reorder_addrs
  2015-10-06 12:17 [Bug network/19074] New: Data race in _res_hconf_reorder_addrs fweimer at redhat dot com
  2015-10-14 14:50 ` [Bug network/19074] " cvs-commit at gcc dot gnu.org
  2015-10-14 14:50 ` fweimer at redhat dot com
@ 2015-10-29 17:11 ` jsm28 at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-29 17:11 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.23

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


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

end of thread, other threads:[~2015-10-29 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-06 12:17 [Bug network/19074] New: Data race in _res_hconf_reorder_addrs fweimer at redhat dot com
2015-10-14 14:50 ` [Bug network/19074] " cvs-commit at gcc dot gnu.org
2015-10-14 14:50 ` fweimer at redhat dot com
2015-10-29 17:11 ` jsm28 at gcc dot gnu.org

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