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

Fix: Addressing Vulnerability in Cloned Function #13346

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

tabudz
Copy link
Contributor

@tabudz tabudz commented Feb 16, 2025

Summary

This PR fixes a security vulnerability in BN_mod_sqrt() that was cloned from OpenSSL but did not receive the security patch applied in OpenSSL. The original issue was reported and fixed under CVE-2022-0778.

Issue Details

The function BN_mod_sqrt() in this repository is nearly identical to BN_mod_sqrt() from OpenSSL.
The original function was patched due to a vulnerability identified in CVE-2022-0778.
The same issue exists in this repository's function but remains unpatched.

Proposed Fix

This PR applies the same patch as the one in OpenSSL to eliminate the vulnerability.

References

CVE: CVE-2022-0778
Original Fix: Original Fix

The calculation in some cases does not finish for non-prime p.

This fixes CVE-2022-0778.

Based on patch by David Benjamin <davidben@google.com>.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
@coolsnowwolf coolsnowwolf merged commit 6c30ff6 into coolsnowwolf:master Feb 17, 2025
github-actions bot pushed a commit to zesming/lede that referenced this pull request Feb 17, 2025
github-actions bot added a commit to EorFiey/Autobuild-LEDE that referenced this pull request Feb 17, 2025
* https://github.com/coolsnowwolf/lede:
  generic: add more switch port link speed nested attributes
  mt7615d: fix possible infinite loop in BN_mod_sqrt() (coolsnowwolf#13346)
github-actions bot added a commit to BCYDTZ/lede that referenced this pull request Feb 17, 2025
* https://github.com/coolsnowwolf/lede:
  generic: add more switch port link speed nested attributes
  mt7615d: fix possible infinite loop in BN_mod_sqrt() (coolsnowwolf#13346)
github-actions bot pushed a commit to evenwangcn/lede that referenced this pull request Feb 17, 2025
* https://github.com/coolsnowwolf/lede:
  generic: add more switch port link speed nested attributes
  mt7615d: fix possible infinite loop in BN_mod_sqrt() (coolsnowwolf#13346)
github-actions bot added a commit to ZeaKyX/lede that referenced this pull request Feb 18, 2025
* https://github.com/coolsnowwolf/lede:
  qualcommax: default to kernel 6.6
  generic: add more switch port link speed nested attributes
  mt7615d: fix possible infinite loop in BN_mod_sqrt() (coolsnowwolf#13346)
@tabudz
Copy link
Contributor Author

tabudz commented Feb 18, 2025

Hey @coolsnowwolf,
Just wanted to let you know that I plan to report this as a CVE. Let me know if you have any concern.
Thanks!

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