public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug network/17562] New: race in getaddrinfo sorting cached in6ai
@ 2014-11-07  9:13 aoliva at sourceware dot org
  2014-11-11 14:19 ` [Bug network/17562] " triegel at redhat dot com
  2021-10-21 15:42 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: aoliva at sourceware dot org @ 2014-11-07  9:13 UTC (permalink / raw)
  To: glibc-bugs

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.


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

* [Bug network/17562] race in getaddrinfo sorting cached in6ai
  2014-11-07  9:13 [Bug network/17562] New: race in getaddrinfo sorting cached in6ai aoliva at sourceware dot org
@ 2014-11-11 14:19 ` triegel at redhat dot com
  2021-10-21 15:42 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: triegel at redhat dot com @ 2014-11-11 14:19 UTC (permalink / raw)
  To: glibc-bugs

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

Torvald Riegel <triegel at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |triegel at redhat dot com

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


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

* [Bug network/17562] race in getaddrinfo sorting cached in6ai
  2014-11-07  9:13 [Bug network/17562] New: race in getaddrinfo sorting cached in6ai aoliva at sourceware dot org
  2014-11-11 14:19 ` [Bug network/17562] " triegel at redhat dot com
@ 2021-10-21 15:42 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2021-10-21 15:42 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|triegel at redhat dot com          |

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

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

end of thread, other threads:[~2021-10-21 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-07  9:13 [Bug network/17562] New: race in getaddrinfo sorting cached in6ai aoliva at sourceware dot org
2014-11-11 14:19 ` [Bug network/17562] " triegel at redhat dot com
2021-10-21 15:42 ` 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).