reNFT - Topmark's results

Collateral-free, permissionless, and highly customizable EVM NFT rentals.

General Information

Platform: Code4rena

Start Date: 08/01/2024

Pot Size: $83,600 USDC

Total HM: 23

Participants: 116

Period: 10 days

Judge: 0xean

Total Solo HM: 1

Id: 317

League: ETH

reNFT

Findings Distribution

Researcher Performance

Rank: 60/116

Findings: 1

Award: $45.31

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: 0xpiken

Also found by: Kalyan-Singh, OMEN, Topmark, bareli, evmboi32, hals, hash, kaden, peter, rbserver, trachev

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
duplicate-162

Awards

45.3128 USDC - $45.31

External Links

Lines of code

https://github.com/re-nft/smart-contracts/blob/3ddd32455a849c3c6dc3c3aad7a33a6c9b44c291/src/packages/Signer.sol#L21

Vulnerability details

Impact

The ECDSA Nonce Reuse Attack has significant implications. It allows attackers to exploit cryptographic weaknesses by impersonating a user of the contract, which can be used to recover users sensitive information like private key thereby draining all victims funds

Proof of Concept

The attack involves generating the malicious data/payload to exploit users signature. For example, a simple signed read-request for an application can be used to demonstrate this technique. The attack generalizes the lattice-based side-channel attacks on ECDSA, and enables the attacker to recover the key from bit leakage scenarios that conventional models cannot process. more details of this vulnerability exploit can be found in this link: https://github.com/pcaversaccio/ecdsa-nonce-reuse-attack

Tools Used

Manual Review, https://github.com/pcaversaccio/ecdsa-nonce-reuse-attack

Mitigation against the ECDSA Nonce Reuse Attack involves several key strategies. Firstly, it is crucial to ensure that every signature requires a unique integer plus the private key. This practice helps to avoid nonce reuse. Secondly, using a secure and reliable pseudorandom number generator (PRNG) when generating nonces is recommended. This approach reduces the likelihood of nonce reuse and makes it harder for an attacker to predict the nonce.

In addition to these measures, implementing constant-time and constant-memory operations can help mitigate side-channel attacks, which can lead to nonce leakage. Keeping cryptographic libraries and systems up-to-date with the latest patches and updates is also essential to protect against known vulnerabilities. Lastly, following secure coding practices and performing regular code reviews can help identify and fix potential security flaws.

It’s important to note that the security of ECDSA and similar cryptographic algorithms relies not only on the hardness of the underlying mathematical problems but also on the correct implementation and use of these algorithms. Therefore, a comprehensive approach to this security is necessary to effectively mitigate against this ECDSA Nonce Reuse Attack in the Signer contract of the re-nft smart-contract.

Assessed type

en/de-code

#0 - c4-pre-sort

2024-01-21T17:52:36Z

141345 marked the issue as duplicate of #179

#1 - c4-pre-sort

2024-01-21T17:53:43Z

141345 marked the issue as duplicate of #239

#2 - c4-judge

2024-01-28T20:50:03Z

0xean changed the severity to 2 (Med Risk)

#3 - c4-judge

2024-01-28T21:05:43Z

0xean marked the issue as satisfactory

#4 - c4-pre-sort

2024-02-02T08:40:18Z

141345 marked the issue as not a duplicate

#5 - c4-pre-sort

2024-02-02T08:40:51Z

141345 marked the issue as duplicate of #162

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax Β© 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter