You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Rainer Jung <ra...@kippdata.de> on 2021/09/11 20:15:19 UTC
APR trunk testcrypto crash with OpenSSL 1.0.2
Hi there,
I get crashes with APR trunk testcrypto when running with OpenSSL 1.0.2
(at least on Linux).
Here's an example:
*** glibc detected *** ./testall: double free or corruption (!prev):
0x00000000021e2d40 ***
#0 0x0000003906b8cee8 in main_arena () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007ffff762f027 in EVP_CIPHER_CTX_cleanup (c=0x6f4770) at
evp_enc.c:593
No locals.
#2 0x00007ffff762f22e in EVP_CIPHER_CTX_free (ctx=0x6f4770) at
evp_enc.c:584
No locals.
#3 0x00007ffff7953021 in cprng_stream_ctx_free (sctx=0x6f7e30) at
/path/to/apr/trunk/r1893236/crypto/apr_crypto_openssl.c:1544
No locals.
#4 0x00007ffff7da89f6 in cprng_cleanup (arg=0x6f7540) at
/path/to/apr/trunk/r1893236/crypto/apr_crypto_prng.c:253
cprng = 0x6f7540
#5 0x00007ffff7da8e8c in apr_crypto_prng_create (pcprng=0x7ffff7ffb1e8,
crypto=<value optimized out>, cipher=<value optimized out>,
bufsize=<value optimized out>,
flags=1, seed=<value optimized out>, pool=0x6f7458) at
/path/to/apr/trunk/r1893236/crypto/apr_crypto_prng.c:388
rv = <value optimized out>
cprng = 0x6f7540
#6 0x00007ffff7da9268 in apr_crypto_prng_init (pool=0x6f7458,
crypto=0x0, cipher=APR_CRYPTO_CIPHER_CHACHA20, bufsize=0, seed=<value
optimized out>,
flags=<value optimized out>) at
/path/to/apr/trunk/r1893236/crypto/apr_crypto_prng.c:174
rv = 0
#7 0x000000000042fefa in test_crypto_prng (tc=0x7fffffffe340,
cipher=APR_CRYPTO_CIPHER_CHACHA20,
test_PRNG_kat0=0x44e320
"\260\375\024\377\226\240\275\241T\303)\b,\234e3\273L\224s\277]\336\023\217\202ɬUS\331X\257\275\255(E\271<۲\376dc\322\376\026*\332\340\366\346v\360IB\030\365\316\005\226\347\237\\U\032\252\233\244o\252\325(\366v=ޓ\300?\243\261!\262\377\300S:i^\325n\217\332\005\211\242\355\353\372\324\256\323\065|z\255\255\223(\002{\270y\265WG\227\241\267=\316|П$Q\001y\004*3\372A\032\067\227:\354\240\374\336k+\026\244_\241*\343\365L\204(\203\353`\316D\351\234L\242np\314&h\370\231Z\241\237ޙ\271\200\v\266\203\024\235r\223\364\321I\363\360\236I\200v\204\001\036y\236pp"...)
at /path/to/apr/trunk/r1893236/test/testcrypto.c:2457
randbytes =
"p\002C\000\000\000\000\000\210\357\204\006\071\000\000\000\030\000\000\000\060\000\000\000\060\343\377\377\377\177\000\000p\342\377\377\377\177\000\000\276\367\272\311!\002\207w\256\277\312)\340\224\202I\213\375_\004\255\355\061M/\000\000\000\000\000\000\000\001",
'\000' <repeats 15 times>,
"\005\000\000\000\000\000\000\000ACEGIKMOQSUWY[]_acegikmo\243\023\207\006\071\000\000"
seed =
"\000\000\000\000\000\000\000\000\200\267\270\006\071\000\000\000\002\000\000\000\000\000\000\000\000\320\330\367\377\177\000"
cprng = 0x0
pool = 0x6f7458
rv = <value optimized out>
i = <value optimized out>
flags = 2
#8 0x000000000040c9c9 in abts_run_test (ts=<value optimized out>,
f=0x430270 <test_crypto_prng_chacha20>, value=0x0)
at /path/to/apr/trunk/r1893236/test/abts.c:192
tc = {failed = 0, skipped = 0, suite = 0x6cc1c0}
ss = 0x6cc1c0
#9 0x000000000042f783 in testcrypto (suite=0x6c91a0) at
/path/to/apr/trunk/r1893236/test/testcrypto.c:2772
Best regards,
Rainer
Re: APR trunk testcrypto crash with OpenSSL 1.0.2
Posted by Yann Ylavic <yl...@gmail.com>.
On Fri, Sep 17, 2021 at 8:11 PM Rainer Jung <ra...@kippdata.de> wrote:
>
> I did not observe this crash with apr-util 1.7.x nor with 1.6.x although
> both HEADS were tested as well. I hope this was not just a limitation of
> my test setup, but at least I am not aware of such a limitation.
r1893270 was backported to apr-util 1.7.x already (r1893278), 1.6.x is
not concerned because there is no apr_crypto_prng there.
Cheers;
Yann.
Re: APR trunk testcrypto crash with OpenSSL 1.0.2
Posted by Rainer Jung <ra...@kippdata.de>.
I did not observe this crash with apr-util 1.7.x nor with 1.6.x although
both HEADS were tested as well. I hope this was not just a limitation of
my test setup, but at least I am not aware of such a limitation.
Regards,
Rainer
Am 17.09.2021 um 19:49 schrieb William A Rowe Jr:
> Did we determine this does not affect apr-util-1.7.x nor
> apr-util-1.6.x branches?
Re: APR trunk testcrypto crash with OpenSSL 1.0.2
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
Did we determine this does not affect apr-util-1.7.x nor
apr-util-1.6.x branches?
Re: APR trunk testcrypto crash with OpenSSL 1.0.2
Posted by Rainer Jung <ra...@kippdata.de>.
Confirmed: crash no longer occurs with current APR trunk.
Thanks a bunch!
Rainer
Am 12.09.2021 um 13:56 schrieb Yann Ylavic:
> Hi Rainer,
>
> On Sat, Sep 11, 2021 at 10:15 PM Rainer Jung <ra...@kippdata.de> wrote:
>>
>> I get crashes with APR trunk testcrypto when running with OpenSSL 1.0.2
>> (at least on Linux).
>>
>> Here's an example:
>>
>> *** glibc detected *** ./testall: double free or corruption (!prev):
>> 0x00000000021e2d40 ***
>
> Thanks for the report, should be fixed (hopefully) in r1893270.
>
> Regards;
> Yann.
Re: APR trunk testcrypto crash with OpenSSL 1.0.2
Posted by Yann Ylavic <yl...@gmail.com>.
Hi Rainer,
On Sat, Sep 11, 2021 at 10:15 PM Rainer Jung <ra...@kippdata.de> wrote:
>
> I get crashes with APR trunk testcrypto when running with OpenSSL 1.0.2
> (at least on Linux).
>
> Here's an example:
>
> *** glibc detected *** ./testall: double free or corruption (!prev):
> 0x00000000021e2d40 ***
Thanks for the report, should be fixed (hopefully) in r1893270.
Regards;
Yann.