[issue46887] ./Programs/_freeze_module fails with MSAN: Uninitialized value was created by an allocation of 'stat.i'
STINNER Victor
report at bugs.python.org
Tue Mar 1 09:49:16 EST 2022
STINNER Victor <vstinner at python.org> added the comment:
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.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46887>
_______________________________________
More information about the Python-bugs-list
mailing list