[tahoe-lafs-trac-stream] [pycryptopp] #80: segfault in Ed25519 on Fedora+gcc-4.7.0-prerelease

pycryptopp trac at tahoe-lafs.org
Mon Feb 13 16:47:56 UTC 2012


#80: segfault in Ed25519 on Fedora+gcc-4.7.0-prerelease
------------------------+--------------------------
     Reporter:  zooko   |      Owner:
         Type:  defect  |     Status:  new
     Priority:  major   |  Milestone:
      Version:  0.5.29  |   Keywords:  fedora crash
Launchpad Bug:          |
------------------------+--------------------------
 https://tahoe-lafs.org/buildbot-
 pycryptopp/builders/Ruben%20Fedora%20syslib/builds/44

 https://tahoe-lafs.org/buildbot-
 pycryptopp/builders/Ruben%20Fedora%20syslib/builds/44/steps/test%20valgrind/logs/valgrind

 valgrind reports the following before the segfault occurs:

 {{{
 ==9709== Invalid read of size 1
 ==9709==    at 0xB4FEE70: crypto_hash_sha512 (sha512-hash.c:40)
 ==9709==    by 0xB4F8F23: crypto_sign_publickey (ed25519.c:30)
 ==9709==    by 0xB4F7EEB: ed25519_publickey (ed25519module.c:48)
 ==9709==    by 0x4F0A153: PyEval_EvalFrameEx (in
 /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4F0B7C0: PyEval_EvalCodeEx (in
 /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4E9C2BA: ??? (in /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4E78A1D: PyObject_Call (in
 /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4E86EEF: ??? (in /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4E78A1D: PyObject_Call (in
 /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4ECBC41: ??? (in /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4ECB8DB: ??? (in /usr/lib64/libpython2.7.so.1.0)
 ==9709==    by 0x4E78A1D: PyObject_Call (in
 /usr/lib64/libpython2.7.so.1.0)
 ==9709==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
 ==9709==
 }}}

 The first culprit I suspect is Fedora's pre-release of gcc 4.7.0, since
 this source passes tests (including valgrind clean) on several other
 platforms and since the underlying C code (i.e. [https://github.com/tahoe-
 lafs/pycryptopp/blob/master/src-ed25519/supercop-ref/sha512-hash.c
 sha512-hash.c]) is used elsewhere, I think probably including in
 [http://nacl.cr.yp.to/ the nacl crypto lib from djb].

-- 
Ticket URL: <http://tahoe-lafs.org/trac/pycryptopp/ticket/80>
pycryptopp <https://tahoe-lafs.org/trac/pycryptopp>



More information about the tahoe-lafs-trac-stream mailing list