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

Missing Error Check in function SSL_CTX_new() #1003

Closed
lc3412 opened this issue Sep 19, 2018 · 1 comment
Closed

Missing Error Check in function SSL_CTX_new() #1003

lc3412 opened this issue Sep 19, 2018 · 1 comment

Comments

@lc3412
Copy link

lc3412 commented Sep 19, 2018

Hi,
Function SSL_CTX_new() returns a pointer to an SSL_CTX object on success or NULL on error. However, the function SSL_CTX_new() in keepalived/genhash/ssl.c didn't check the return value is NULL or not, before passing the return value as an argument to the function SSL_CTX_set_verify_depth(). See the following details.

screenshot from 2018-09-19 16-32-44

Chi Li, Zuxing Gu, Jiecheng Wu

pqarmitage added a commit to pqarmitage/keepalived that referenced this issue Sep 19, 2018
Issue acassen#1003 identified that genhash used the return value of
SSL_CTX_new() without checking whether it was NULL.

This commits now adds the necessary check, and also does the
same in keepalived build_ssl_ctx() in check_ssl.c.

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
@pqarmitage
Copy link
Collaborator

Many thanks for reporting this.

Commit a007e93 adds a check of the return value of SSL_CTX_new(). More importantly it also adds the same check to keepalived in check_ssl.c/build_ssl_ctx().

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

2 participants