Skip to content

Update liboqs and oqs-provider submodules - Add X25519MLKEM768 NIST f… #2091

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

Merged

Conversation

siddharth-narayan
Copy link
Contributor

Fixes #2090

This PR updates submodules:

The NIST has finalized Crystals Kyber into what is now ML-KEM. ML-KEM has been added in this liboqs version, so it has also been added into the list of TLS groups that we attempt to connect with.

This version of liboqs is the last with support for the previous x25519_kyber768 exchange, so in the future, if these submodules are updated, those keys will have to be removed.

@siddharth-narayan
Copy link
Contributor Author

I don't have access to coverity, so I can't tell for sure if updating like this fixes the problems. Would you be able to check?

@chipitsine chipitsine merged commit 2628ac1 into SoftEtherVPN:master Jan 15, 2025
13 checks passed
@chipitsine
Copy link
Member

coverity runs daily, let's see tomorrow

@siddharth-narayan
Copy link
Contributor Author

Has the coverity scan reported no errors with the submodules? I can see the overview but not the details.

@chipitsine
Copy link
Member

https://github.com/SoftEtherVPN/SoftEtherVPN/actions/workflows/coverity.yml

scan was 20 hours ago, 1 hour before merge.
next scan will be in 4 hours

@siddharth-narayan
Copy link
Contributor Author

Oh I didn't realize that was before merge!

@siddharth-narayan
Copy link
Contributor Author

What's the result? As far as I can tell, the action just shows that Coverity ran not the results.

@chipitsine
Copy link
Member

image

@siddharth-narayan
Copy link
Contributor Author

Does Coverity have the potential for false positives?

We should create issue reports in the oqs-provider repository if these are true positives.

@chipitsine
Copy link
Member

chipitsine commented Jan 16, 2025 via email

@chipitsine
Copy link
Member

@siddharth-narayan , I've approved your account, feel free to review findings.
if you are associated with oqs projects, you can setup dedicated scan for them (if not already)

here's an example of automated workflow https://github.com/SoftEtherVPN/SoftEtherVPN/blob/master/.github/workflows/coverity.yml

@siddharth-narayan
Copy link
Contributor Author

I thought it would be very simple too :( I saw the aproval, so I'll check out the code, but I'm not at all famililar with it. I'm not associated with oqs at all, so we might have to make an issue on their repo.

@siddharth-narayan
Copy link
Contributor Author

It seems like the scan might be broken? Take this code that it marked as an out of bounds read:

Where res seems to be a buffer with 750 bytes, and placed is used to do pointer arithmetic. However, the while statement does check that placed < 750. This seems to keep the read in bounds.

image

@chipitsine
Copy link
Member

I'd say that coverity has lowest false positive rate compared to other analyzers. of course false are possible

@chipitsine
Copy link
Member

btw, you can set "classification" to false positive and it won't appear in scan result anymore

image

@siddharth-narayan
Copy link
Contributor Author

siddharth-narayan commented Jan 16, 2025

I've already covered a few issues but most issues seem to be false positives. Look at this code for example. All the errors are the same as the one I posted previously, and additionally the offset SPX_OFFSET_KP_ADDR1 is reported incorrectly (Coverity thinks it's 23, but its real value is 13). This is also true for all the other offsets in the other issues that are visible. And that's not even counting that an offset of 23 is fine for a 32 byte array.

image

There's also this much more reasonable example where Coverity can't reasonably be expected to follow the flow properly, but j + len never exceeds 255

image

The problem is this type of code is duplicated quite a bit everywhere, considering that they support the same algorithms with different sizes, so it results in many false positives.

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.

static analysis finding (mostly oqs)
2 participants