CVSROOT:        /cvs
Module name:    src
Changes by:     schwa...@cvs.openbsd.org        2022/12/06 09:10:55

Modified files:
        lib/libcrypto/bio: bio_lib.c 

Log message:
Improve the poorly designed BIO_set_next(3) API to always preserve all
invariants of the prev_bio and next_bio fields of all BIO objects
in all involved chains, no matter which arguments this function is
called with.

Both real-world uses of this function (in libssl and freerdp) have
been audited to make sure this makes nothing worse.  We believe libssl
behaves correctly before and after the patch (mostly because the second
argument is NULL there), and we believe the code in freerdp behaves
incorrectly before and after the patch, leaving a prev_bio pointer in
place that is becoming bogus, only in a different object before and
after the patch.  But after the patch, that bogus pointer is due to a
separate bug in BIO_push(3), which we are planning to fix afterwards.

Joint work with and OK tb@.

Reply via email to