Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no error handling of key_schedule_new failure #488

Open
sshock opened this issue Oct 9, 2023 · 0 comments
Open

no error handling of key_schedule_new failure #488

sshock opened this issue Oct 9, 2023 · 0 comments

Comments

@sshock
Copy link
Contributor

sshock commented Oct 9, 2023

key_schedule_new is called from two places, but neither one checks for NULL return value.

As a result, failure to create a hash alg results in a crash (seg fault) happening later on in an unrelated spot.

Can we add something like this after calling key_schedule_new in these two spots?

        if (tls->key_schedule == NULL) {
            ret = PTLS_ERROR_NO_MEMORY;
            goto Exit;
        }
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

No branches or pull requests

1 participant