Skip to content

rust-openssl is vulnerable to the Marvin Attack #2171

@tomato42

Description

@tomato42

I've reviewed the code responsible for doing RSA PKCS#1v1.5 decryption:
https://github.com/sfackler/rust-openssl/blob/a644ec2542473c854a02b7fe642621e813517979/openssl/src/encrypt.rs#L440-L453

and I'm pretty sure that it is vulnerable to the Marvin Attack as it will perform a jump/branch based on the error value returned from OpenSSL.

If you'd like to perform actual test for the leakage (to confirm the review and measure the size of the side-channel), I can run the test, but I'd like to ask for help in writing a test harness. Example test harnesses are available in the marvin-toolkit repo, the one for rust-crypto would most likely be the easiest one to adapt for this package.

May I also ask for assigning a CVE to this issue? As a repo owner you can create a security issue here in github and ask for a CVE assignment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions