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

setsockopt return value is not checked #4799

Open
WesleyRosenblum opened this issue Sep 24, 2024 · 0 comments
Open

setsockopt return value is not checked #4799

WesleyRosenblum opened this issue Sep 24, 2024 · 0 comments

Comments

@WesleyRosenblum
Copy link
Contributor

Problem:

The return value of setsockopt is not checked in several places in s2n_socket.c, for example: https://github.com/aws/s2n-tls/blob/main/utils/s2n_socket.c#L123

Some of the uses of setsockopt have the comment /* Ignore the return value, if it fails it fails */, but others do not, so its not clear if it was intentional.

Solution:

Either check the return value, or add a comment

  • Does this change what S2N sends over the wire? No
  • Does this change any public APIs? No

Requirements / Acceptance Criteria:

Uses of setsockopt either check the return value or have a comment explaining why it is not checked

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

No branches or pull requests

2 participants