References: <20190816204945.7937-1-a@...2181...> <20190817064836.GS1349@...1296...> From: Arne Schwabe Message-ID: <38e3b7fc-d99c-354b-337e-0d9295b91a24@...1227...> Date: Sat, 17 Aug 2019 19:56:19 +0200 MIME-Version: 1.0 In-Reply-To: <20190817064836.GS1349@...1296...> Content-Language: en-GB Subject: Re: [Openvpn-devel] [PATCH] mbedtls: fix segfault by calling mbedtls_cipher_free() in cipher_ctx_free() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: Gert Doering , Antonio Quartulli Cc: openvpn-devel@lists.sourceforge.net Am 17.08.2019 um 08:48 schrieb Gert Doering: > Hi, > > On Fri, Aug 16, 2019 at 10:49:45PM +0200, Antonio Quartulli wrote: >> Commit ("openssl: Fix compilation without deprecated OpenSSL 1.1 APIs") >> has removed the cipher_ctx_cleanup() API, as it is not anymore required >> to be a distinct call. However, while doing so it also touched the >> mbedtls backend in a wrong way causing a systematic segfault upon connec= tion. >> >> Basically mbedtls_cipher_free(ctx) was moved from the defunct cipher_ctx= _cleanup() >> to md_ctx_free(), while it was supposed to go into cipher_ctx_free(). >> This was clearly wrong as also the type of the ctx variable was not >> correct anymore. >> >> Fix this mistake by actually moving mbedtls_cipher_free(ctx) to >> cipher_ctx_free(). > This looks reasonable, the explanation makes sense and it pacifies > buildbot (gave this a test run on all the bots, and we're back to > "t_client test 1 fails on ubuntu+fedora29", and no more crashes). > > So I'm good with it, though I'd welcome a confirmation from Arne > or Steffan. Yeah, sorry that looks like a very stupid mistake from my side :( Acked-By: Arne Schwabe