summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/bn/bn_mod_sqrt.c
diff options
context:
space:
mode:
authorschwarze <>2022-12-06 17:59:21 +0000
committerschwarze <>2022-12-06 17:59:21 +0000
commit63e1e004d5a60eea51f7c1fcc42d54aca4f605b9 (patch)
tree72250057930a6e3053a58f75395ccc2a7e41c53c /src/regress/lib/libcrypto/bn/bn_mod_sqrt.c
parent73e2daf0f78d5a05d5bb4c92a2a82363f1e98378 (diff)
downloadopenbsd-63e1e004d5a60eea51f7c1fcc42d54aca4f605b9.tar.gz
openbsd-63e1e004d5a60eea51f7c1fcc42d54aca4f605b9.tar.bz2
openbsd-63e1e004d5a60eea51f7c1fcc42d54aca4f605b9.zip
Make sure BIO_push(3) always preserves all invariants of the prev_bio
and next_bio fields of all BIO objects in all affected chains, no matter what the arguments are. In particular, if the second argument (the one to be appended) is not at the beginning of its chain, properly detach the beginning of its chain before appending. We have weak indications that this bug might affect real-world code. For example, in FreeRDP, file libfreerdp/crypto/tls.c, function bio_rdp_tls_ctrl(), case BIO_C_SET_SSL, BIO_push(3) is definitely called with a second argument that is *not* at the beginning of its chain. Admittedly, that code is hard to fathom, but it does appear to result in a bogus prev_bio pointer without this patch. The practical impact of this bug in this and other software remains unknown; the consequences might possibly escalate up to use-after-free issues if BIO_pop(3) is afterwards called on corrupted BIO objects. OK tb@
Diffstat (limited to 'src/regress/lib/libcrypto/bn/bn_mod_sqrt.c')
0 files changed, 0 insertions, 0 deletions