public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/55815] New: switch hash function of libstdc++ hash tables to siphash
@ 2012-12-26 21:39 felix-gcc at fefe dot de
  2013-01-05 13:29 ` [Bug libstdc++/55815] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: felix-gcc at fefe dot de @ 2012-12-26 21:39 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55815

             Bug #: 55815
           Summary: switch hash function of libstdc++ hash tables to
                    siphash
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: felix-gcc@fefe.de


Hash functions traditionally used by language runtimes for hash tables do not
assume that input values will be chosen maliciously to cause collisions and
degrade performance.  This has become a published attack vector on internet
facing hash tables as used in, for example, web services or even memory cache
code in front of a database or so.

libsupc++ implements the Murmur hash, which was specifically targeted in a
recent paper attacking hash functions.  See https://131002.net/siphash/ for the
attack code that produces collisions in Murmur2 and Murmur3.

libsupc++ should switch the hash function to siphash, the function proposed by
the authors of this attack.

The same bug should be filed against other user facing hash table
implementations in gcc.  I can think of Java and Go, but there might be others.

It may even make sense to replace the hash code gcc itself uses, as there are
now web pages where you can paste code and see which code gcc generates for it,
turning this problem into a security issue if someone pastes code with
colliding symbols to exploit this problem.


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

end of thread, other threads:[~2015-09-23  9:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-26 21:39 [Bug libstdc++/55815] New: switch hash function of libstdc++ hash tables to siphash felix-gcc at fefe dot de
2013-01-05 13:29 ` [Bug libstdc++/55815] " redi at gcc dot gnu.org
2013-01-05 14:35 ` redi at gcc dot gnu.org
2013-01-05 14:48 ` paolo.carlini at oracle dot com
2015-09-22 22:11 ` gpike at google dot com
2015-09-23  2:08 ` felix-glibc at fefe dot de
2015-09-23  3:29 ` miyuki at gcc dot gnu.org
2015-09-23  9:56 ` redi 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).