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

RUSTSEC-2022-0093: Double Public Key Signing Function Oracle Attack on ed25519-dalek #1298

Closed
github-actions bot opened this issue Aug 15, 2023 · 3 comments · Fixed by #1586
Closed
Assignees

Comments

@github-actions
Copy link
Contributor

Double Public Key Signing Function Oracle Attack on ed25519-dalek

Details
Package ed25519-dalek
Version 1.0.1
URL https://github.com/MystenLabs/ed25519-unsafe-libs
Date 2022-06-11
Patched versions >=2

Versions of ed25519-dalek prior to v2.0 model private and public keys as
separate types which can be assembled into a Keypair, and also provide APIs
for serializing and deserializing 64-byte private/public keypairs.

Such APIs and serializations are inherently unsafe as the public key is one of
the inputs used in the deterministic computation of the S part of the signature,
but not in the R value. An adversary could somehow use the signing function as
an oracle that allows arbitrary public keys as input can obtain two signatures
for the same message sharing the same R and only differ on the S part.

Unfortunately, when this happens, one can easily extract the private key.

Revised public APIs in v2.0 of ed25519-dalek do NOT allow a decoupled
private/public keypair as signing input, except as part of specially labeled
"hazmat" APIs which are clearly labeled as being dangerous if misused.

See advisory page for additional details.

@MitchTurner
Copy link
Member

libp2p currently depends on an old version of ed25519-dalek which has the vulnerability mentioned in RUSTSEC-2022-0093

Until libp2p fixes it on there side, we have to ignore the advisory in .cargo/audit.toml.

The maintainers of libp2p are aware of the [issue(]libp2p/rust-libp2p#4327). Once they release a fix, we can depend on their new version.

@Dentosal
Copy link
Member

This can be fixed by updating libp2p dependency to the latest version.

@Dentosal
Copy link
Member

Dentosal commented Dec 4, 2023

Fixed in #1475. Verified with cargo-tree at 04520a6. Nevermind

@Dentosal Dentosal closed this as completed Dec 4, 2023
@Dentosal Dentosal reopened this Dec 4, 2023
xgreenx added a commit that referenced this issue Dec 22, 2023
#1298

### Documentation:
Removed `upgrade::read_length_prefixed` and
`upgrade::write_length_prefixed`:
https://github.com/libp2p/rust-libp2p/pull/4787/files
Remove `FastMessageId`:
libp2p/rust-libp2p#4138
Remove `TokioDnsConfig`:
libp2p/rust-libp2p@95890b5
Implement `InboundConnectionUpgrade`/`OutboundConnectionUpgrade`:
libp2p/rust-libp2p#4307

---------

Co-authored-by: Brandon Vrooman <brandon.vrooman@gmail.com>
Co-authored-by: Hannes Karppila <hannes.karppila@gmail.com>
Co-authored-by: xgreenx <xgreenx9999@gmail.com>
MitchTurner added a commit that referenced this issue Jan 6, 2024
Closes #1298

---------

Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
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.

4 participants