[Bug 3548] Upgrading from openssl-3.0.8 to openssl-3.1.0 leads to version mismatch error

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Mar 15 11:30:21 AEDT 2023


https://bugzilla.mindrot.org/show_bug.cgi?id=3548

--- Comment #7 from Darren Tucker <dtucker at dtucker.net> ---
Comment on attachment 3685
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3685
My take

>+        lfix = (libver & 0x0ffffff0L) >> 12;

That's going to include the patchlevel which we previously did not (but
since they also say "We also allow backporting of accessor functions in
these releases" was that deliberate?  if so is there any point in
disallowing this here, since in that case the dynamic linking would
fail anyway before we got to this check?)

If we're going to do the same checks we can use the same code.

    if (headerver < 0x3000000f) {
        mask = 0xfff0000fL; /* major,minor,status */
        hfix = (headerver & 0x000ff000) >> 12;
        lfix = (libver & 0x000ff000) >> 12;
    } else {
        mask = 0xf000000fL; /* major, status */
        hfix = (headerver & 0x0ffffff0L) >> 12;
        lfix = (libver & 0x0ffffff0L) >> 12;
    }

    if ( (headerver & mask) == (libver & mask) && lfix >= hfix)
        return 1;
    return 0;

If you ignore the patchlevel for both you could even complement the
mask and use that to compute hfix and lfix once, but I think that'd be
sufficiently unclear as to be not worth the couple of lines saved.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list