public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aoliva at sourceware dot org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug network/17562] New: race in getaddrinfo sorting cached in6ai Date: Fri, 07 Nov 2014 09:13:00 -0000 [thread overview] Message-ID: <bug-17562-131@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2014-11-07 9:13 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-11-07 9:13 aoliva at sourceware dot org [this message] 2014-11-11 14:19 ` [Bug network/17562] " triegel at redhat dot com 2021-10-21 15:42 ` fweimer at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-17562-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).