openresty / openresty/lua-nginx-module

Uncheked result of method SSL_set_tlsext_status_type()

Open
#2,395 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

Greetings! I've been investigating lua-nginx-module with Svace static analyzer and it found a curious method to look at.

https://github.com/openresty/lua-nginx-module/blob/004922e1cf95eabde001203e2010365ff5d3e70d/src/ngx_http_lua_socket_tcp.c#L1629-L1881

Here the return value of method incovation SSL_set_tlsext_status_type() (which calls SSL_ctrl() under the hood) is not checked at the following cases:

https://github.com/openresty/lua-nginx-module/blob/004922e1cf95eabde001203e2010365ff5d3e70d/src/ngx_http_lua_socket_tcp.c#L1791-L1792

and

https://github.com/openresty/lua-nginx-module/blob/004922e1cf95eabde001203e2010365ff5d3e70d/src/ngx_http_lua_socket_tcp.c#L1838

but usually it is checked for the function SSL_ctrl()


The Question:

After a long research and official OpenSSL docs read I'm still not sure if it's correct not to check the returning value in the cases above.

What do you think about this?


Found by Linux Verification Center (linuxtesting.org) with SVACE.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/ngx_http_lua_socket_tcp.c at the two SSL_set_tlsext_status_type() call sites around lines 1791-1792 and 1838, then compare nearby SSL_ctrl() handling with the relevant OpenSSL documentation. Done means determining whether these return values require handling and documenting the conclusion or addressing the unchecked results.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.