https://bz.apache.org/bugzilla/show_bug.cgi?id=70260

--- Comment #13 from Eric Covener <[email protected]> ---
@steffen can you see if defining HAVE_OPENSSL_INIT_CRYPTO in apu_config.hw
solves it?

Claude analysis:

Likely culprit: r1908584 on the 1.6.x branch (ylavic, 2023-03-20,
"apr_crypto_openssl: Compatibility with OpenSSL 3+", merging trunk
r1908433/r1908448/r1908453/r1908455/r1908503 and 1.7.x r1862838/r1908581). It
is the only change between the 1.6.3 and 1.6.5 tags that alters what the
apr_crypto_t context pointer holds.

Why this commit. The crash is a read fault inside the thin wrapper at
crypto/apr_crypto.c:400, which does nothing but
f->provider->get_block_key_types(types, f). So either f is NULL or garbage.
Only three commits touch crypto in the range, and the other two are not
candidates:

- r1936805 / r1936828 / r1937013 (CVE-2025-49506 timing-safe compares): only
change apr_crypto_equals and apr_password_validate. No pointer or lifecycle
changes.
- r1916306: adds (void) to prototypes in apu_dso.c. No behavior change.

The struct apr_crypto_t layout that the wrapper peeks at (pool, provider) is
identical in both tags, so a DLL mismatch between libaprutil-1.dll and
apr_crypto_openssl-1.dll would not explain this fault either.

What r1908584 changed in crypto_make() in crypto/apr_crypto_openssl.c:

- It now sets *ff = NULL at entry and only assigns the context after everything
succeeds. In 1.6.3 *ff was assigned early, so a caller got a fully usable
context (types and modes populated, cleanup registered) even when the function
returned APR_ENOENGINE or APR_EINITENGINE.
- New failure modes were added: an engine= parameter returns APR_ENOTIMPL when
the OpenSSL ENGINE API is unavailable, and engine=openssl is now silently
skipped instead of looked up.
- Initialization switched to OPENSSL_init_crypto() when
HAVE_OPENSSL_INIT_CRYPTO is defined. On Windows that macro is never defined
because apu_config.hw is static, so the legacy init path still runs there.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to