Package: dumpasn1 Version: 20150808-1 Severity: normal dumpasn1 segfaults on some certificates when printing Unicode strings.
E.g. you can try it with the certificate downloaded from http://www.grfc.ru/upload/medialibrary/eec/016301.p7b Valgrind backtrace: 144 58: SET { 146 56: SEQUENCE { 148 3: OBJECT IDENTIFIER streetAddress (2 5 4 9) 153 49: UTF8String ==31111== Invalid read of size 4 ==31111== at 0x4ED2D19: wcsnlen (wcsnlen.c:31) ==31111== by 0x4ED2556: wcsrtombs (wcsrtombs.c:104) ==31111== by 0x4E6D0D0: wcstombs (wcstombs.c:34) ==31111== by 0x402998: displayUnicode (dumpasn1.c:1325) ==31111== by 0x403B46: displayString (dumpasn1.c:1914) ==31111== by 0x405C58: printASN1object (dumpasn1.c:2823) ==31111== by 0x406222: printAsn1 (dumpasn1.c:2974) ==31111== by 0x404C86: printConstructed (dumpasn1.c:2475) ==31111== by 0x405264: printASN1object (dumpasn1.c:2598) ==31111== by 0x406222: printAsn1 (dumpasn1.c:2974) ==31111== by 0x404C86: printConstructed (dumpasn1.c:2475) ==31111== by 0x405264: printASN1object (dumpasn1.c:2598) ==31111== Address 0x414 is not stack'd, malloc'd or (recently) free'd ==31111== ==31111== ==31111== Process terminating with default action of signal 11 (SIGSEGV) ==31111== Access not within mapped region at address 0x414 ==31111== at 0x4ED2D19: wcsnlen (wcsnlen.c:31) ==31111== by 0x4ED2556: wcsrtombs (wcsrtombs.c:104) ==31111== by 0x4E6D0D0: wcstombs (wcstombs.c:34) ==31111== by 0x402998: displayUnicode (dumpasn1.c:1325) ==31111== by 0x403B46: displayString (dumpasn1.c:1914) ==31111== by 0x405C58: printASN1object (dumpasn1.c:2823) ==31111== by 0x406222: printAsn1 (dumpasn1.c:2974) ==31111== by 0x404C86: printConstructed (dumpasn1.c:2475) ==31111== by 0x405264: printASN1object (dumpasn1.c:2598) ==31111== by 0x406222: printAsn1 (dumpasn1.c:2974) ==31111== by 0x404C86: printConstructed (dumpasn1.c:2475) ==31111== by 0x405264: printASN1object (dumpasn1.c:2598) ==31111== If you believe this happened as a result of a stack ==31111== overflow in your program's main thread (unlikely but ==31111== possible), you can try to increase the size of the ==31111== main thread stack using the --main-stacksize= flag. ==31111== The main thread stack size used in this run was 8388608. -- With best wishes Dmitry -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=ru_RU.utf8, LC_CTYPE=ru_RU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system) Versions of packages dumpasn1 depends on: ii libc6 2.24-3 dumpasn1 recommends no packages. dumpasn1 suggests no packages. -- no debconf information