This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2022-03-01.14:49:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646146156.1.0.547709204735.issue46887@roundup.psfhosted.org>
In-reply-to
Content
Hum, later "import ssl" in setup.py also fails. Simplified code:
---
import _ssl
print(_ssl.txt2obj('1.3.6.1.5.5.7.3.1', name=False)) # server OID
---

Error:
---
$ ./python x.py 
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x701000000032, 8)
==135651==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x49467c in memcmp (/home/vstinner/python/main/python+0x49467c)
    #1 0x7f5546825adc in OBJ_bsearch_ex_ (/lib64/libcrypto.so.1.1+0x14eadc)
    #2 0x7f5546826ff1 in OBJ_obj2nid (/lib64/libcrypto.so.1.1+0x14fff1)
    #3 0x7f554675b434  (/lib64/libcrypto.so.1.1+0x84434)
    #4 0x7f554675b6af in d2i_ASN1_OBJECT (/lib64/libcrypto.so.1.1+0x846af)
    #5 0x7f5546827702 in OBJ_txt2obj (/lib64/libcrypto.so.1.1+0x150702)
    #6 0x7f5546a78c31 in _ssl_txt2obj_impl /home/vstinner/python/main/Modules/_ssl.c:5276:11
    #7 0x7f5546a78c31 in _ssl_txt2obj /home/vstinner/python/main/Modules/clinic/_ssl.c.h:1216:20
    (...)

  Uninitialized value was created by a heap allocation
    #0 0x466642 in __interceptor_malloc (/home/vstinner/python/main/python+0x466642)
    #1 0x7f55468276b3 in OBJ_txt2obj (/lib64/libcrypto.so.1.1+0x1506b3)

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/home/vstinner/python/main/python+0x49467c) in memcmp
Exiting
---

The Python code calls OBJ_txt2obj("1.3.6.1.5.5.7.3.1", 0) in C: the OpenSSL function.
History
Date User Action Args
2022-03-01 14:49:16vstinnersetrecipients: + vstinner
2022-03-01 14:49:16vstinnersetmessageid: <1646146156.1.0.547709204735.issue46887@roundup.psfhosted.org>
2022-03-01 14:49:16vstinnerlinkissue46887 messages
2022-03-01 14:49:15vstinnercreate