[Bug 1543455] Comment bridged from LTC Bugzilla

bugproxy bugproxy at us.ibm.com
Thu Jul 20 09:39:36 UTC 2017


------- Comment From freude at de.ibm.com 2017-07-20 05:36 EDT-------
Catched the reason:
All the internal function pointers in libibmca are NULL. So the sha1 call jumps over zero ;-). The reason why all the function pointers are NULL is simple because the ibmca engine init function ibmca_init() is called 3 (!!!) times.
The start of this function is:

static int ibmca_init(ENGINE * e)
{
static int init = 0;

if (ibmca_dso != NULL && init >= 2) {
IBMCAerr(IBMCA_F_IBMCA_INIT, IBMCA_R_ALREADY_LOADED);
goto err;
}

so init values >= 2 will cause the code to jump to the err label where
all internal function pointers are set to NULL. Tracing shows this very
clear. The first init works fine, the second similar but the third init
now decides to clear the function pointers and that's it.

Solution: Calling init more than once is certainly a feature :-).
However, a rework of the code like this:

static int ibmca_init(ENGINE * e)
{
static int init = 0;

if (init > 0)
return 1;

and everything is fine. So openssl call the engine's init function as
often as wanted it does no harm.

I'll attach a patch. Paulo please review the patch, maybe comment and rework and integrate this or another solution into the ibmca engine.
regards
H.Freudenberger

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to wget in Ubuntu.
https://bugs.launchpad.net/bugs/1543455

Title:
  wget crashes with openssl-ibmca

Status in Ubuntu on IBM z Systems:
  Confirmed
Status in wget package in Ubuntu:
  Confirmed

Bug description:
  WIth openssl-ibmca enabled, wget crashes downloading things from
  launchpad librarian.

  actual bug in openssl-ibmca package.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1543455/+subscriptions



More information about the foundations-bugs mailing list