s2n-tls
s2n-tls copied to clipboard
fix: close all /dev/urandom open fds
Resolved issues:
Partially solve https://github.com/aws/s2n-tls/issues/4005
Description of changes:
- Clean up all of opened
/dev/urandom
.
Call-outs:
- See PR#4833 and PR#4834 for fixes of other open fds.
- I didn't add a test in this PR. The test to detect all opened fds will be in a separate PR.
Testing:
- Test locally.
- Add
--track-fds=yes
to CTest memcheck and direct all Valgrind output toMemoryTester.log
files. - Search in VS Code for Open File Descriptors of
/dev/urandom
.- Previously opened
/dev/urandom
in tests that are fixed.
- Previously opened
- This is similar to the check in
./codebuild/bin/test_exec_leak.sh
. https://github.com/aws/s2n-tls/blob/6bb195c23fd1ecf623dece3b43644e7c9a9e0e20/codebuild/bin/test_exec_leak.sh#L82-L97
- Add
- Open fds test will be implemented once PR#4851 is merged.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.