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

Remove jent_read_entropy_safe from Jitter code (main) #2110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smittals2
Copy link
Contributor

Issues:

Resolves #ISSUE-NUMBER1
Addresses #ISSUE-NUMBER2

Description of changes:

These changes remove the jent_read_entropy_safe function from our library and our Jitter code. This function has an implementation vulnerability described here.

Call-outs:

Eventually, we should pull in the newest Jitter release with the security fix.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@smittals2 smittals2 requested a review from a team as a code owner January 10, 2025 22:23
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.76%. Comparing base (e34998e) to head (c6cd95b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2110      +/-   ##
==========================================
+ Coverage   78.75%   78.76%   +0.01%     
==========================================
  Files         598      598              
  Lines      103656   103657       +1     
  Branches    14720    14722       +2     
==========================================
+ Hits        81635    81649      +14     
+ Misses      21368    21354      -14     
- Partials      653      654       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines -45 to -48
// Draw some entropy with the "safe" API to check if it works.
EXPECT_EQ(jent_read_entropy_safe(&jitter_ec.instance,
(char*) data1, data_len), data_len);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the spirit of this test was a very simple sanity test that jitter was returning unique output based on line 49. Instead of removing this just use the same jent_read_entropy as above.

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

Successfully merging this pull request may close these issues.

3 participants