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

komodo master: 1 vulnerabilities (highest severity is: 5.3) #630

Closed
TheComputerGenie opened this issue Oct 1, 2024 · 4 comments · Fixed by #632
Closed

komodo master: 1 vulnerabilities (highest severity is: 5.3) #630

TheComputerGenie opened this issue Oct 1, 2024 · 4 comments · Fixed by #632

Comments

@TheComputerGenie
Copy link

TheComputerGenie commented Oct 1, 2024

Vulnerable Library - komodo

Komodo

Library home page: https://github.com/KomodoPlatform/komodo.git

Found in HEAD commit: 0adeeabdd484ef40539d1275c6a765f5c530ea79

Vulnerable Source Files (1)

/src/cryptoconditions/src/include/ed25519/src/ed25519.h

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (komodo version) Automated Remediation Possible**
CVE-2024-45193 Medium 5.3 komodo Direct N/A

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2024-45193

Vulnerable Library - komodo

Komodo

Library home page: https://github.com/KomodoPlatform/komodo.git

Found in HEAD commit: 0adeeabdd484ef40539d1275c6a765f5c530ea79

Found in base branch: master

Vulnerable Source Files (1)

/src/cryptoconditions/src/include/ed25519/src/ed25519.h

Vulnerability Details

An issue was discovered in Matrix libolm through 3.2.16. There is Ed25519 signature malleability due to lack of validation criteria (does not ensure that S < n). This refers to the libolm implementation of Olm. NOTE: This vulnerability only affects products that are no longer supported by the maintainer.

Publish Date: 2024-08-22

URL: CVE-2024-45193

CVSS 3 Score Details (5.3)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

@DeckerSU
Copy link

DeckerSU commented Oct 1, 2024

Thanks for bringing this to our attention. The vulnerable ed25519_verify function is only called in chains that use Crypto Conditions (CC), which is already at the end of life (EOL) and currently unsupported. We still keep CC in the codebase for backward compatibility with these chains. Chains that don’t use CC, such as KMD itself and 98% of others, are not affected by CVE-2024-45192.

Regarding the CC library, we are actively working on a fix. One possible solution is switching to libsodium for validating ed25519 signatures. However, this is not set in stone, as the final solution could involve completely removing the CC library from the daemon and discontinuing support for such chains.

Stay tuned for updates with more information, and thank you once again. I also want to explicitly mention that KMD is not affected by CVE-2024-45192, as this code is never executed in chains where CC is disabled.

@TheComputerGenie
Copy link
Author

TheComputerGenie commented Oct 1, 2024

I also want to explicitly mention that KMD is not affected by CVE-2024-45192, as this code is never executed in chains where CC is disabled

Correct, just wanted to pass on what came through the checks in my fork.
The same applies to #631 (CC related and only py tests)

@DeckerSU
Copy link

DeckerSU commented Oct 1, 2024

Btw, this code isn’t only present in the CC library or libolm. For instance, if you look at the popular libtorrent project, which serves as the foundation for many torrent clients like Deluge and qBittorrent, it also contains the same code: link to code. This means there’s also nothing in place to prevent signature malleability, but for most protocols, it’s not a significant issue.

As for CC itself, if I recall correctly, Ed25519 signatures aren’t used for anything critical in libcc (though I could be wrong, since the CC-related parts were written by others). Either way, this will be resolved soon, whether through a fix or an explanation of why it’s not critical in this case.

DeckerSU added a commit that referenced this issue Oct 2, 2024
- #630
- https://soatok.blog/2024/08/14/security-issues-in-matrixs-olm-library/#vuln-ed25519

Actually, the current CC code doesn’t use Ed25519 signatures, so `CVE-2024-45193` has no impact on Komodo (KMD) or any existing assetchains. However, since CC could potentially use these types of signatures in the future (e.g., for newly developed CCs), we’ve added a `0 <= s < L` check to prevent signature malleability.
@DeckerSU DeckerSU linked a pull request Oct 2, 2024 that will close this issue
6 tasks
DeckerSU added a commit to DeckerSU/KomodoOcean that referenced this issue Oct 2, 2024
- KomodoPlatform/komodo#630
- https://soatok.blog/2024/08/14/security-issues-in-matrixs-olm-library/#vuln-ed25519

Actually, the current CC code doesn’t use Ed25519 signatures, so `CVE-2024-45193` has no impact on Komodo (KMD) or any existing assetchains. However, since CC could potentially use these types of signatures in the future (e.g., for newly developed CCs), we’ve added a `0 <= s < L` check to prevent signature malleability.
DeckerSU added a commit that referenced this issue Oct 3, 2024
* cc: fix ed25519 signatures malleability

- #630
- https://soatok.blog/2024/08/14/security-issues-in-matrixs-olm-library/#vuln-ed25519

Actually, the current CC code doesn’t use Ed25519 signatures, so `CVE-2024-45193` has no impact on Komodo (KMD) or any existing assetchains. However, since CC could potentially use these types of signatures in the future (e.g., for newly developed CCs), we’ve added a `0 <= s < L` check to prevent signature malleability.

* add ed25519 signature malleability test

* use int instead of size_t in 0 <= s < L check loop

using a signed integer type (int) is preferable here,
to avoid potential issues with unsigned underflow.

* cc: test, update pytest ver. requirement

addressed in #631
@DeckerSU
Copy link

DeckerSU commented Oct 3, 2024

Closed as fixed in #632 .

@DeckerSU DeckerSU closed this as completed Oct 3, 2024
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 a pull request may close this issue.

2 participants