Skip to content

iperf_auth: check BIO_read return value in Base64Decode#2040

Open
dxbjavid wants to merge 1 commit into
esnet:masterfrom
dxbjavid:fix-base64decode-bioread-error
Open

iperf_auth: check BIO_read return value in Base64Decode#2040
dxbjavid wants to merge 1 commit into
esnet:masterfrom
dxbjavid:fix-base64decode-bioread-error

Conversation

@dxbjavid
Copy link
Copy Markdown

On malformed base64 input (e.g. the 2-char string "AB"), BIO_read in
Base64Decode returns -1, which is assigned to the size_t out-parameter
*length and silently becomes SIZE_MAX while the function still returns
0. Callers in iperf_auth.c (decode_auth_setting, load_pubkey_from_base64)
then pass that huge length downstream. Check the BIO_read result, free
the buffer and report failure if it is negative.

@bmah888 bmah888 self-assigned this May 22, 2026
@bmah888
Copy link
Copy Markdown
Contributor

bmah888 commented May 22, 2026

Thanks for the PR! We'll take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants