This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/19074] New: Data race in _res_hconf_reorder_addrs
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 06 Oct 2015 12:17:30 +0000
- Subject: [Bug network/19074] New: Data race in _res_hconf_reorder_addrs
- Auto-submitted: auto-generated
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.