Re: libcrypto: fix leak in BN_mpi2bn()

2022-11-08 Thread Theo Buehler
On Tue, Nov 08, 2022 at 11:06:43AM -0700, Todd C. Miller wrote: > On Tue, 08 Nov 2022 18:33:48 +0100, Tobias Heider wrote: > > > If ain == NULL then a points to newly malloced memory which should be > > freed when BN_bin2bn() fails. > > We don't have an "ain" function argument in LibreSSL so you

Re: libcrypto: fix leak in BN_mpi2bn()

2022-11-08 Thread Tobias Heider
On Tue, Nov 08, 2022 at 11:06:43AM -0700, Todd C. Miller wrote: > On Tue, 08 Nov 2022 18:33:48 +0100, Tobias Heider wrote: > > > If ain == NULL then a points to newly malloced memory which should be > > freed when BN_bin2bn() fails. > > We don't have an "ain" function argument in LibreSSL so you

Re: libcrypto: fix leak in BN_mpi2bn()

2022-11-08 Thread Todd C . Miller
On Tue, 08 Nov 2022 18:33:48 +0100, Tobias Heider wrote: > If ain == NULL then a points to newly malloced memory which should be > freed when BN_bin2bn() fails. We don't have an "ain" function argument in LibreSSL so you will need a larger diff. Perhaps something like this (untested). - todd

libcrypto: fix leak in BN_mpi2bn()

2022-11-08 Thread Tobias Heider
If ain == NULL then a points to newly malloced memory which should be freed when BN_bin2bn() fails. ok? Index: bn/bn_mpi.c === RCS file: /cvs/src/lib/libcrypto/bn/bn_mpi.c,v retrieving revision 1.8 diff -u -p -r1.8 bn_mpi.c --- bn/bn