Sui Protocol: Program Info

Triaged by HackenProof
Sui

Sui is a smart contract platform maintained by a permissionless set of validators that play a role similar to validators or miners in other blockchain systems.

In Scope

Target Type Severity Reward
https://github.com/MystenLabs/sui/tree/testnet/narwhal

Blockchain/DLT - Sui Network Consensus

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/crates/sui-node

Blockchain/DLT - Sui Network

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/crates/sui-core

Blockchain/DLT - Sui Network

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/crates/sui-types

Blockchain/DLT - Sui Network

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/crates/json-rpc

Blockchain/DLT - Sui Network

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/crates/json-rpc-types

Blockchain/DLT - Sui Network

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/external-crates/move

Blockchain/DLT - Sui Move

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/crates/sui-adapter

Blockchain/DLT - Sui Move

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/testnet/crates/sui-verifier

Blockchain/DLT - Sui Move

Protocol Critical Bounty
https://github.com/MystenLabs/sui/tree/main/crates/sui-framework

Blockchain/DLT - Sui Framework

Protocol Critical Bounty

IN-SCOPE

Only the following impacts are accepted within this bug bounty program. All other impacts are not considered as in-scope, even if they affect something in the assets in scope table.

Blockchain/DLT

  • Exceeding the maximum supply of 10 billion SUI + allowing the attacker to claim the excess funds (Critical)
  • Loss of Funds (Critical)
  • Violating BFT assumptions, acquiring voting power vastly disproportionate to stake, or any other issue that can meaningfully compromise the integrity of the blockchain’s proof of stake governance (Critical)
  • Network not being able to confirm new transactions (total network shutdown) requiring a hard fork to resolve (Critical)
  • Arbitrary, non-Move remote code execution on unmodified validator software (Critical)
  • Temporary total network shutdown or unintended chain split (duration greater than 10 minutes) (High)
  • A bug that results in unintended and harmful smart contract behavior with no concrete funds at direct risk (Medium)
  • Unintended, permanent burning of SUI under the max cap (Medium)
  • Shutdown of greater than or equal to 30% of network processing nodes without brute force actions, but does not shut down the network (Medium)
  • Send a transaction that triggers an invariant violation error code in unmodified validator software (Low)
  • A remote call that crashes a Sui fullnode (Low)

ZkLogin Circuits

Vulnerabilities in Circuit Construction can lead to Loss of funds (Critical)

DeepBook

Critical - $50,000 - $100,000

Issues leading to bugs or attacks resulting in significant loss of funds or Permanent freezing of funds or Permanent DoS/ Interruption on the CLOB that requires a protocol upgrade.

High - $5,000-$20,000

Issues leading to Temporary DoS/ Interruption on the CLOB and temporary freezing of funds upto 1 epoch

Medium $1000-$5,000

Issues leading to minor loss of funds (<$100 USD) and Temporary DoS

Low $200- $1,000

OUT OF SCOPE

The following vulnerabilities are excluded from the rewards for this bug bounty program:

  • Impacts requiring attacks that the reporter has already exploited themselves, leading to damage
  • Impacts caused by attacks requiring access to leaked keys/credentials
  • Impacts caused by attacks requiring access to privileged addresses (governance, strategist) except in such cases where the contracts are intended to have no privileged access to functions that make the attack possible
  • Mentions of secrets, access tokens, API keys, private keys, etc. in Github will be considered out of scope without proof that they are in-use in production

Best practice recommendations:

  • Feature requests

Smart Contracts/Blockchain DLT

  • Incorrect data supplied by third party oracles
  • Not to exclude oracle manipulation/flash loan attacks
  • Impacts requiring basic economic and governance attacks (e.g. 51% attack)
  • Lack of liquidity impacts
  • Impacts from Sybil attacks
  • Impacts involving centralization risks

Websites and Apps

  • Theoretical impacts without any proof or demonstration
  • Impacts involving attacks requiring physical access to the victim device
  • Impacts involving attacks requiring access to the local network of the victim
  • Reflected plain text injection (e.g. url parameters, path, etc.)
  • This does not exclude reflected HTML injection with or without JavaScript
  • This does not exclude persistent plain text injection
  • Any impacts involving self-XSS
  • Captcha bypass using OCR without impact demonstration
  • CSRF with no state modifying security impact (e.g. logout CSRF)
  • Impacts related to missing HTTP Security Headers (such as X-FRAME-OPTIONS) or cookie security flags (such as “httponly”) without demonstration of impact
  • Server-side non-confidential information disclosure, such as IPs, server names, and most stack traces
  • Impacts causing only the enumeration or confirmation of the existence of users or tenants
  • Impacts caused by vulnerabilities requiring un-prompted, in-app user actions that are not part of the normal app workflows
  • Lack of SSL/TLS best practices
  • Impacts that only require DDoS
  • UX and UI impacts that do not materially disrupt use of the platform
  • Impacts primarily caused by browser/plugin defects
  • Leakage of non sensitive API keys (e.g. Etherscan, Infura, Alchemy, etc.)
  • Any vulnerability exploit requiring browser bugs for exploitation (e.g. CSP bypass
  • SPF/DMARC misconfigured records
  • Missing HTTP Headers without demonstrated impact
  • Automated scanner reports without demonstrated impact
  • UI/UX best practice recommendations
  • Non-future-proof NFT rendering

To maintain integrity, avoid potential conflicts of interest, and ensure an effective bug bounty/auditing program, the following restrictions apply:

  • Current employees ,vendors (auditors), partners and contractors of Mysten Labs and Sui Foundation are not eligible to participate in the bug bounty program.
  • Former employees and contractors of Mysten Labs and Sui Foundation, who ceased working with the aforementioned entities must wait 6 months before they are eligible to participate in the bug bounty program.
  • Sanctioned individuals and/or organizations are not eligible to participate in the bug bounty program. These restrictions are put in place to ensure the objectivity of the bug bounty program and to prevent any potential conflicts of interest.
  • Avoid using web application scanners for automatic vulnerability searching which generates massive traffic
  • Make every effort not to damage or restrict the availability of products, services, or infrastructure
  • Avoid compromising any personal data, interruption, or degradation of any service
  • Don’t access or modify other user data, localize all tests to your accounts
  • Perform testing only within the scope
  • Don’t exploit any DoS/DDoS vulnerabilities, social engineering attacks, or spam
  • Don’t spam forms or account creation flows using automated scanners
  • In case you find chain vulnerabilities we’ll pay only for vulnerability with the highest severity.
  • Don’t break any law and stay in the defined scope
  • Any details of found vulnerabilities must not be communicated to anyone who is not a HackenProof Team or an authorized employee of this Company without appropriate permission
  • Please note: SUI company is entitled to make the payment in their native SUI token
  • In case that your findings is valid you will be asked for KYC verification to proceed with payments

Previous audits and known issues can be found at: https://github.com/sui-foundation/security-audits

  • In our staking contract, we have the concept of pool tokens and keep track of exchange rates between pool tokens and SUI tokens of all epochs, which increase as more rewards are added to the staking pools. When a user withdraws their stake, we retrieve from that record both the exchange rate at staking time and the current exchange rate (at withdrawing time), and calculate the rewards to be paid out based on the difference in exchange rates. While doing this calculation, we do conversions both ways: pool tokens -> SUI and SUI -> pool tokens. Rounding may happen along the way due to integer division.

The exchange rate between the two tokens should stay roughly the same since we will be burning a proportional amount of pool tokens as SUI is withdrawn. However, in the extreme case where a user is unstaking 1 MIST, this rounding error may cause ZERO pool tokens to be burnt, causing the pool token to effectively depreciate. If an attacker has a lot of 1 MIST stakes, they can withdraw them one by one, causing the pool token exchange rate to drop and other takers to “lose” their staking rewards. I put quotation marks around “lose” because the attacker themselves won’t get any of that rewards so this attacker doesn’t actually make economic sense. Rather the rewards stay in the rewards pool and will become dust.

This issue is mitigated by enforcing a minimum staking amount of 1 SUI or 10^9 MIST in this PR: https://github.com/MystenLabs/sui/pull/9961 Related Impact-in-Scope: Critical - Any other issue leading to theft or loss of valuable objects, with severity depending on the consequences of the issue and the preconditions for exploiting it.

  • Excessive storage rebate on 0x5 object right after epoch change: Each on-chain object is associated with a storage rebate, which would be refunded to the owner if it ever gets deleted. Epoch change transactions are special in that they are system transactions without a sender, hence any excessive storage rebate generated in that transaction is kept in the 0x5 object. This means that the first person touching the 0x5 object in each epoch may be able to obtain those excessive rebate by simply touching this object (e.g. a failed staking request). We will look into a way to evenly distribute those excessive rebates such that is does not lead to any undesired behaviors.

Dev Environment and Documentation

Sui has included dev documentation and/or instructions to help in reviewing code and exploring for bugs:

https://docs.sui.io/
https://docs.sui.io/build/sui-local-network
https://docs.sui.io/build/devnet
https://github.com/MystenLabs/sui/blob/main/SECURITY.md

Impacts to other assets

Hackers are encouraged to submit issues outside of the outlined Impacts and Assets in Scope.

If whitehats can demonstrate a critical impact on code in production for an asset not in scope, Sui encourages you to submit your bug report using the “primacy of impact exception” asset.

  • Do not discuss this program or any vulnerabilities (even resolved ones) outside of the program without express consent from the organization
  • No vulnerability disclosure, including partial is allowed for the moment.
  • Please do NOT publish/discuss bugs

We are happy to thank everyone who submits valid reports which help us improve the security. However, only those that meet the following eligibility requirements may receive a monetary reward:

  • You must be the first reporter of a vulnerability.
  • The vulnerability must be a qualifying vulnerability
  • Any vulnerability found must be reported no later than 24 hours after discovery and exclusively through hackenproof.com
  • You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
  • You must not be a former or current employee of us or one of its contractor.
  • Provide detailed but to-the-point reproduction steps
  • Current employees ,vendors (auditors), partners and contractors of Mysten Labs Inc. and Sui Foundation are not eligible to participate in the bug bounty program.
  • Former employees and contractors of Mysten Labs Inc. and Sui Foundation, who ceased working with the aforementioned entities must wait 6 months before they are eligible to participate in the bug bounty program.
  • Sanctioned individuals and/or organizations are not eligible to participate in the bug bounty program.

Response Times
Critical - Response within 24 hours
High - Response within 48 hours
Medium and Low - Response within 72 hours

Experimental features are not guaranteed to be deployed to the Sui mainnet. These features are often in early stages of development and may undergo significant changes or even be discontinued. We are eager for whitehats to focus on code that already is live in mainnet, or will be soon.

Experimental features are those specifically mentioned in this exclusion list, as well as any features labeled as experimental in the source code, not in testnet or related documentation. This tag serves to notify researchers that the feature is subject to special rules under the bug bounty program.

Payout Reduction

All payouts for vulnerabilities identified within the experimental feature will be subject to a reduced payout. The maximum payout for vulnerabilities found in experimental features is capped at *$15,000. *

List of Experimental Features

  1. Native Bridge: This feature is currently under development and testing, and is classified as experimental. https://github.com/MystenLabs/sui/tree/main/crates/sui-bridge
    https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/packages/bridge
    Solidity Code Related to the Native Bridge

  2. zkLogin with Multisig
    https://github.com/MystenLabs/sui/pull/14145
    https://github.com/MystenLabs/sui/pull/15023

  3. zkLogin providers (Apple, Kakao, Slack)
    https://github.com/MystenLabs/sui/pull/14322

  4. Random beacon
    https://github.com/MystenLabs/sui/blob/main/crates/sui-protocol-config/src/lib.rs#L326

  5. Enums

Researchers are encouraged to report vulnerabilities in experimental features following the same procedure as for standard features.