Skip to content

openssl: Fix missing error propagation for BIO_printf() calls#21360

Open
ndossche wants to merge 1 commit intophp:PHP-8.4from
ndossche:clesss-31
Open

openssl: Fix missing error propagation for BIO_printf() calls#21360
ndossche wants to merge 1 commit intophp:PHP-8.4from
ndossche:clesss-31

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Mar 6, 2026

Since these go through a file, this can fail.
For some of these, the error is already checked but not propagated to userland, causing a "true" return value but an incomplete file. For others, the error is not checked and can also lead to an incomplete file.
Solve this by always propagating failure, especially as the other write calls are already checked for failure.

This was found by a hybrid static-dynamic analyser that looks for inconsistent handling of error checks in bindings.

Since these go through a file, this can fail.
For some of these, the error is already checked but not propagated to
userland, causing a "true" return value but an incomplete file.
For others, the error is not checked and can also lead to an incomplete
file.
Solve this by always propagating failure, especially as the other write
calls are already checked for failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant