-
Notifications
You must be signed in to change notification settings - Fork 123
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
SCRUTINICE fixes #2180
SCRUTINICE fixes #2180
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2180 +/- ##
==========================================
- Coverage 79.03% 79.02% -0.01%
==========================================
Files 612 612
Lines 106064 106067 +3
Branches 14984 14984
==========================================
- Hits 83829 83823 -6
- Misses 21581 21590 +9
Partials 654 654 ☔ View full report in Codecov by Sentry. |
crypto/ml_dsa/ml_dsa_ref/sign.c
Outdated
uint8_t empty_msg[1] = {0}; | ||
int ret = ml_dsa_sign(params, signature, ¶ms->bytes, empty_msg, 0, NULL, 0, sk); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional? empty_message is actually 1 uint8_t long, but you're passing in 0 for the length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea previously this code was passing in NULL which never gets checked. I tried doing a 0 length array, but you cant initialize an array of 0 length on c89/90 I believe. So then I did a 1 length arr. But still passing in length 0 so it's considered an empty message. This is intentional.
Per Jake, what the message is doesn't matter for the PCT.
a16ec4e
to
4ee43c3
Compare
Issues:
P197895641
,P197898490
Description of changes:
Scrutinice alerts for a null check and potential memory leak
Call-outs:
Point out areas that need special attention or support during the review process. Discuss architecture or design changes.
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.