This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/17562] New: race in getaddrinfo sorting cached in6ai
- From: "aoliva at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 07 Nov 2014 09:13:19 +0000
- Subject: [Bug network/17562] New: race in getaddrinfo sorting cached in6ai
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17562
Bug ID: 17562
Summary: race in getaddrinfo sorting cached in6ai
Product: glibc
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: network
Assignee: unassigned at sourceware dot org
Reporter: aoliva at sourceware dot org
check_pf may return a shared in6ai, saved in a cache and returned to multiple
concurrent threads. getaddrinfo sorts this array regardless of other uses;
there's even a risk that multiple getaddrinfo concurrent runs corrupt the array
by sorting it concurrently.
Since __check_pf is an internal function, and its only user is getaddrinfo, it
shouldn't be too hard to fix this. One possibility is to pass the sort
function to __check_pf, have __check_pf do the sorting before caching the
result, and for extra care use the compare function as part of the test on
whether the cache is valid (not much point in adding support for re-sorting
into a new cached entry for now, since we always use the same function).
--
You are receiving this mail because:
You are on the CC list for the bug.