openssl/openssl

MD4 miscompilation on windows 11 arm64 vs2022

Open

#28,310 opened on Aug 20, 2025

 (5 comments) (0 reactions) (0 assignees)C (11,262 forks)batch import
branch: 3.0branch: 3.2branch: 3.3branch: 3.4branch: 3.5branch: masterhelp wantedtriaged: bug

Repository metrics

Stars
 (30,157 stars)
PR merge metrics
 (PR metrics pending)

Description

Hey, I'm trying to build openssl 3.0.17 natively on windows arm64 using VS2022 17.12 LTS and I see this unit test failure, which I'll be disabling for now. Please let us know if this is something worth worrying about.

Here's the config dump:

C:\jk\packagey\vcpkg\buildtrees\openssl\build_configuration-rel>perl configdata.pm --dump

Command line (with current working directory = .):

    C:\Strawberry\perl\bin\perl.exe Configure enable-fips shared no-makedepend VC-WIN64-ARM `
      --prefix=C:\jk\packagey\vcpkg\packages\openssl_build_configuration `
      --openssldir=C:\jk\packagey\vcpkg\packages\openssl_build_configuration `
      AS=C:\Program Files\NASM\nasm.exe `
      CC=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostarm64\arm64\cl.exe `
      CFLAGS=  -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP  -MD -O2 -Oi -Gy -DNDEBUG -Z7   /guard:cf /Z7 /GS /sdl /Qspectre /ZH:SHA_256 /W3 `
      AR=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostarm64\arm64\lib.exe `
      ARFLAGS=-machine:ARM64 -nologo `
      LD=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostarm64\arm64\link.exe `
      LDFLAGS= /guard:cf /DEBUG /DYNAMICBASE /NXCOMPAT /CETCOMPAT:NO /LIBPATH:"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.42.34433/lib/spectre/arm64"
      
Perl information:

    C:\Strawberry\perl\bin\perl.exe
    5.32.1 for MSWin32-x64-multi-thread

Enabled features:

    acvp-tests
    aria
    async
    atexit
    autoalginit
    autoerrinit
    autoload-config
    bf
    blake2
    bulk
    cached-fetch
    camellia
    capieng
    cast
    chacha
    cmac
    cmp
    cms
    comp
    ct
    deprecated
    des
    dgram
    dh
    dsa
    dso
    dtls
    dynamic-engine
    ec
    ec2m
    ecdh
    ecdsa
    engine
    err
    filenames
    fips
    fips-securitychecks
    gost
    idea
    legacy
    loadereng
    md4
    mdc2
    module
    multiblock
    nextprotoneg
    ocb
    ocsp
    padlockeng
    pic
    pinshared
    poly1305
    posix-io
    psk
    rc2
    rc4
    rdrand
    rfc3779
    rmd160
    scrypt
    secure-memory
    seed
    shared
    siphash
    siv
    sm2
    sm3
    sm4
    sock
    srp
    srtp
    sse2
    ssl
    ssl-trace
    static-engine
    stdio
    tests
    threads
    tls
    ts
    ui-console
    whirlpool
    tls1
    tls1-method
    tls1_1
    tls1_1-method
    tls1_2
    tls1_2-method
    tls1_3
    dtls1
    dtls1-method
    dtls1_2
    dtls1_2-method

Disabled features:

    afalgeng            [not-linux]      OPENSSL_NO_AFALGENG
    asan                [default]        OPENSSL_NO_ASAN
    asm                 [no asm_arch]    OPENSSL_NO_ASM
    buildtest-c++       [default]
    crypto-mdebug       [default]        OPENSSL_NO_CRYPTO_MDEBUG
    devcryptoeng        [default]        OPENSSL_NO_DEVCRYPTOENG
    ec_nistp_64_gcc_128 [default]        OPENSSL_NO_EC_NISTP_64_GCC_128
    egd                 [default]        OPENSSL_NO_EGD
    external-tests      [default]        OPENSSL_NO_EXTERNAL_TESTS
    fuzz-afl            [default]        OPENSSL_NO_FUZZ_AFL
    fuzz-libfuzzer      [default]        OPENSSL_NO_FUZZ_LIBFUZZER
    ktls                [default]        OPENSSL_NO_KTLS
    makedepend          [option]
    md2                 [default]        OPENSSL_NO_MD2 (skip crypto\md2)
    msan                [default]        OPENSSL_NO_MSAN
    rc5                 [default]        OPENSSL_NO_RC5 (skip crypto\rc5)
    sctp                [default]        OPENSSL_NO_SCTP
    trace               [default]        OPENSSL_NO_TRACE
    ubsan               [default]        OPENSSL_NO_UBSAN
    unit-test           [default]        OPENSSL_NO_UNIT_TEST
    uplink              [no uplink_arch] OPENSSL_NO_UPLINK
    weak-ssl-ciphers    [default]        OPENSSL_NO_WEAK_SSL_CIPHERS
    zlib                [default]
    zlib-dynamic        [default]
    ssl3                [default]        OPENSSL_NO_SSL3
    ssl3-method         [default]        OPENSSL_NO_SSL3_METHOD

Config target attributes:

    AR => "lib",
    ARFLAGS => "/nologo",
    CC => "cl",
    CFLAGS => "/W3 /wd4090 /nologo /O2",
    CPP => "\$(CC) /EP /C",
    HASHBANGPERL => "/usr/bin/env perl",
    LD => "link",
    LDFLAGS => "/nologo /debug",
    MT => "mt",
    MTFLAGS => "-nologo",
    RANLIB => "CODE(0x653f6a0)",
    RC => "rc",
    ar_resp_delim => "
",
    aroutflag => "/out:",
    bin_cflags => "/Zi /Fdapp.pdb",
    bin_lflags => "setargv.obj /subsystem:console /opt:ref",
    bn_ops => "SIXTY_FOUR_BIT RC4_CHAR",
    build_file => "makefile",
    build_scheme => [ "unified", "windows", "VC-common" ],
    cflags => "/Gs0 /GF /Gy /MD",
    coutflag => "/Fo",
    cppflags => "",
    defines => [ "OPENSSL_BUILDING_OPENSSL", "OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN", "UNICODE", "_UNICODE", "_CRT_SECURE_NO_DEPRECATE", "_WINSOCK_DEPRECATED_NO_WARNINGS", "_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE", "OPENSSL_SYS_WIN_CORE" ],
    disable => [  ],
    dso_cflags => "/Zi /Fddso.pdb",
    dso_scheme => "win32",
    enable => [  ],
    ex_libs => "onecore.lib",
    includes => [  ],
    ld_implib_flag => "/implib:",
    ld_resp_delim => "
",
    lddefflag => "/def:",
    ldoutflag => "/out:",
    ldpostoutflag => "",
    ldresflag => " ",
    lflags => "/NODEFAULTLIB:kernel32.lib /APPCONTAINER",
    lib_cflags => "/Zi /Fdossl_static.pdb",
    lib_cppflags => "",
    lib_defines => [ "L_ENDIAN" ],
    makedep_scheme => "VC",
    makedepcmd => "\$(CC) /Zs /showIncludes",
    module_cflags => "",
    module_cxxflags => undef,
    module_ldflags => "/dll",
    mtinflag => "-manifest ",
    mtoutflag => "-outputresource:",
    multilib => "-arm64",
    perl_platform => "Windows::MSVC",
    rcoutflag => "/fo",
    shared_cflag => "",
    shared_defflag => "",
    shared_defines => [  ],
    shared_ldflag => "/dll",
    shared_rcflag => "",
    shared_target => "win-shared",
    thread_defines => [  ],
    thread_scheme => "winthreads",
    unistd => "<unistd.h>",

Recorded environment:

    AR =
    ASFLAGS =
    BUILDFILE =
    CC =
    CFLAGS =
    CPP =
    CPPDEFINES =
    CPPFLAGS =
    CPPINCLUDES =
    CROSS_COMPILE =
    CXX =
    CXXFLAGS =
    HASHBANGPERL =
    LDFLAGS =
    LDLIBS =
    MT =
    MTFLAGS =
    OPENSSL_LOCAL_CONFIG_DIR =
    PERL =
    RANLIB =
    RC =
    RCFLAGS =
    RM =
    WINDRES =
    __CNF_CFLAGS =
    __CNF_CPPDEFINES =
    __CNF_CPPFLAGS =
    __CNF_CPPINCLUDES =
    __CNF_CXXFLAGS =
    __CNF_LDFLAGS =
    __CNF_LDLIBS =

Makevars:

    AR              = C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostarm64\arm64\lib.exe
    ARFLAGS         = -machine:ARM64 -nologo
    AS              = C:\Program Files\NASM\nasm.exe
    CC              = C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostarm64\arm64\cl.exe
    CFLAGS          =   -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP  -MD -O2 -Oi -Gy -DNDEBUG -Z7   /guard:cf /Z7 /GS /sdl /Qspectre /ZH:SHA_256 /W3
    CPP             = $(CC) /EP /C
    CPPDEFINES      =
    CPPFLAGS        =
    CPPINCLUDES     =
    CXXFLAGS        =
    HASHBANGPERL    = /usr/bin/env perl
    LD              = C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostarm64\arm64\link.exe
    LDFLAGS         =  /guard:cf /DEBUG /DYNAMICBASE /NXCOMPAT /CETCOMPAT:NO /LIBPATH:"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.42.34433/lib/spectre/arm64"
    LDLIBS          =
    MT              = mt
    MTFLAGS         = -nologo
    PERL            = C:\Strawberry\perl\bin\perl.exe
    RANLIB          = ranlib
    RC              = rc
    RCFLAGS         =

NOTE: These variables only represent the configuration view.  The build file
template may have processed these variables further, please have a look at the
build file for more exact data:
    makefile

build file:

    makefile

build file templates:

    Configurations\common0.tmpl
    Configurations\windows-makefile.tmpl

30-test_engine.t ................... ok

        # INFO: 
        # Reading ..\..\test\recipes\30-test_evp_data\evpmd_md.txt
        # INFO: 
        # Starting "MD2 tests" tests at line 9
        # INFO: 
        # skipping, 'MD2' is disabled
        # INFO: 
        # skipping, 'MD2' is disabled
        # INFO: 
        # skipping, 'MD2' is disabled
        # INFO: 
        # skipping, 'MD2' is disabled
        # INFO: 
        # skipping, 'MD2' is disabled
        # INFO: 
        # skipping, 'MD2' is disabled
        # INFO: 
        # skipping, 'MD2' is disabled
        # INFO: 
        # Starting "MD4 tests" tests at line 46
        # INFO: 
        # MD4 is fetched
        # ERROR: (memory) 'expected == got' failed @ test\evp_test.c:107
        # --- expected
        # +++ got
        # 0000:-31d6cfe0d16ae931 b73c59d7e0c089c0
        # 0000:+33b38a79d16ae931 b73c59d7e0c089c0
        #       ^^^^^^^^                         
        # 
        # INFO: 
        # ..\..\test\recipes\30-test_evp_data\evpmd_md.txt:48: Source of above error; unexpected error DIGEST_MISMATCH
        # INFO: 
        # MD4 is fetched
        # ERROR: (memory) 'expected == got' failed @ test\evp_test.c:107
        # --- expected
        # +++ got
        # 0000:-bde52cb31de33e46 245e05fbdbd6fb24
        # 0000:+bfc2e74b1de33e46 245e05fbdbd6fb24
        #       ^^^^^^^^                         
        # 
        # INFO: 
        # ..\..\test\recipes\30-test_evp_data\evpmd_md.txt:53: Source of above error; unexpected error DIGEST_MISMATCH
        # INFO: 
        # MD4 is fetched
        # ERROR: (memory) 'expected == got' failed @ test\evp_test.c:107
        # --- expected
        # +++ got
        # 0000:-a448017aaf21d852 5fc10ae87aa6729d
        # 0000:+a625bc12af21d852 5fc10ae87aa6729d
        #       ^^^^^^^^                         
        # 
        # INFO: 
        # ..\..\test\recipes\30-test_evp_data\evpmd_md.txt:58: Source of above error; unexpected error DIGEST_MISMATCH
        # INFO: 
        # MD4 is fetched
        # ERROR: (memory) 'expected == got' failed @ test\evp_test.c:107
        # --- expected
        # +++ got
        # 0000:-d9130a8164549fe8 18874806e1c7014b
        # 0000:+dbf0c41964549fe8 18874806e1c7014b
        #       ^^^^^^^^                         
        # 
        # INFO: 
        # ..\..\test\recipes\30-test_evp_data\evpmd_md.txt:63: Source of above error; unexpected error DIGEST_MISMATCH
        # INFO: 
        # MD4 is fetched
        # ERROR: (memory) 'expected == got' failed @ test\evp_test.c:107
        # --- expected
        # +++ got
        # 0000:-d79e1c308aa5bbcd eea8ed63df412da9
        # 0000:+d97bd7c88aa5bbcd eea8ed63df412da9
        #       ^^^^^^^^                         
        # 
        # INFO: 
        # ..\..\test\recipes\30-test_evp_data\evpmd_md.txt:68: Source of above error; unexpected error DIGEST_MISMATCH
        # INFO: 
        # MD4 is fetched
        # ERROR: (memory) 'expected == got' failed @ test\evp_test.c:107
        # --- expected
        # +++ got
        # 0000:-043f8582f241db35 1ce627e153e7f0e4
        # 0000:+d9681f0bd6f6510c abda843cdc74c245
        #       ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
        # 
        # INFO: 
        # ..\..\test\recipes\30-test_evp_data\evpmd_md.txt:73: Source of above error; unexpected error DIGEST_MISMATCH
        # INFO: 
        # MD4 is fetched
        # ERROR: (memory) 'expected == got' failed @ test\evp_test.c:107
        # --- expected
        # +++ got
        # 0000:-e33b4ddc9c38f219 9c3e7b164fcc0536
        # 0000:+5a7ca00f838942ad 133f6f0641a6213e
        #       ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
        # 
        # INFO: 
        # ..\..\test\recipes\30-test_evp_data\evpmd_md.txt:78: Source of above error; unexpected error DIGEST_MISMATCH
        # INFO: 
        # Starting "MD5 tests" tests at line 83
        # INFO: 
        # MD5 is fetched
        # INFO: 
        # MD5 is fetched
        # INFO: 
        # MD5 is fetched
        # INFO: 
        # MD5 is fetched
        # INFO: 
        # MD5 is fetched
        # INFO: 
        # MD5 is fetched
        # INFO: 
        # MD5 is fetched
        # INFO: 
        # Starting "MD5-SHA1" tests at line 113
        # INFO: 
        # MD5-SHA1 is fetched
        # INFO: 
        # MD5-SHA1 is fetched
        # INFO: 
        # MD5-SHA1 is fetched
        # INFO: 
        # Completed 17 tests with 7 errors and 7 skipped
        # OPENSSL_TEST_RAND_ORDER=1755725243
        not ok 1 - iteration 1
# ------------------------------------------------------------------------------
    # OPENSSL_TEST_RAND_ORDER=1755725243
    not ok 1 - run_file_tests
# ------------------------------------------------------------------------------
C:\Strawberry\perl\bin\perl.exe ..\..\util\wrap.pl ..\..\test\evp_test.exe -config ..\..\test\default-and-legacy.cnf ..\..\test\recipes\30-test_evp_data\evpmd_md.txt => 1
not ok 90 - running evp_test -config ..\..\test\default-and-legacy.cnf evpmd_md.txt
# ------------------------------------------------------------------------------
# Looks like you failed 1 test of 104.30-test_evp.t ...................... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/104 subtests 
	(less 3 skipped subtests: 100 okay)
30-test_evp_byname.t ............... ok

Contributor guide