Segurança

Denial of Service (DoS)

A class of attacks that prevent legitimate users from successfully executing transactions against a Solana program, either by exhausting the compute budget (e.g., triggering O(n) iteration over an unbounded on-chain list to force CU exhaustion), filling an account's allocated space to block appends, or exploiting program logic to cause systematic transaction failure. On Solana, each transaction has a compute budget cap of 1.4 million CUs by default (extendable to 1.4 million via ComputeBudgetInstruction), so programs that loop over caller-controlled data sizes are vulnerable. Mitigations include bounding all on-chain collections, paginating iteration, and preferring off-chain indexing over on-chain enumeration.

IDdenial-of-service

Leitura rápida

Comece pela explicação mais curta e útil antes de aprofundar.

A class of attacks that prevent legitimate users from successfully executing transactions against a Solana program, either by exhausting the compute budget (e.g., triggering O(n) iteration over an unbounded on-chain list to force CU exhaustion), filling an account's allocated space to block appends, or exploiting program logic to cause systematic transaction failure. On Solana, each transaction has a compute budget cap of 1.4 million CUs by default (extendable to 1.4 million via ComputeBudgetInstruction), so programs that loop over caller-controlled data sizes are vulnerable. Mitigations include bounding all on-chain collections, paginating iteration, and preferring off-chain indexing over on-chain enumeration.

Modelo mental

Use primeiro a analogia curta para raciocinar melhor sobre o termo quando ele aparecer em código, docs ou prompts.

Pense nisso como um bloco de construção que ajuda a ligar uma definição isolada ao sistema maior onde ela vive.

Contexto técnico

Coloque o termo dentro da camada de Solana em que ele vive para raciocinar melhor sobre ele.

Falhas, auditorias, superfícies de ataque e padrões seguros.

Por que builders ligam para isso

Transforme o termo de vocabulário em algo operacional para produto e engenharia.

Este termo destrava conceitos adjacentes rapidamente, então funciona melhor quando você o trata como um ponto de conexão, não como definição isolada.

Handoff para IA

Handoff para IA

Use este bloco compacto quando quiser dar contexto aterrado para um agente ou assistente sem despejar a página inteira.

Denial of Service (DoS) (denial-of-service)
Categoria: Segurança
Definição: A class of attacks that prevent legitimate users from successfully executing transactions against a Solana program, either by exhausting the compute budget (e.g., triggering O(n) iteration over an unbounded on-chain list to force CU exhaustion), filling an account's allocated space to block appends, or exploiting program logic to cause systematic transaction failure. On Solana, each transaction has a compute budget cap of 1.4 million CUs by default (extendable to 1.4 million via ComputeBudgetInstruction), so programs that loop over caller-controlled data sizes are vulnerable. Mitigations include bounding all on-chain collections, paginating iteration, and preferring off-chain indexing over on-chain enumeration.
Relacionados: Unidades de Computação (CU), Transação
Glossary Copilot

Faça perguntas de Solana com contexto aterrado sem sair do glossário.

Use contexto do glossário, relações entre termos, modelos mentais e builder paths para receber respostas estruturadas em vez de output genérico.

Explicar este código

Opcional: cole código Anchor, Solana ou Rust para o Copilot mapear primitivas de volta para termos do glossário.

Faça uma pergunta aterrada no glossário

Faça uma pergunta aterrada no glossário

O Copilot vai responder usando o termo atual, conceitos relacionados, modelos mentais e o grafo ao redor do glossário.

Grafo conceitual

Veja o termo como parte de uma rede, não como uma definição sem saída.

Esses ramos mostram quais conceitos esse termo toca diretamente e o que existe uma camada além deles.

Ramo

Unidades de Computação (CU)

A measure of computational resources consumed by transaction execution, analogous to gas on Ethereum. Each BPF instruction costs CU; syscalls have predefined CU costs (e.g., SHA-256: 85 CU base + per-byte). Default per-instruction limit is 200,000 CU; max per-transaction is 1,400,000 CU. Priority fee cost = CU price × CU consumed.

Ramo

Transação

An atomic unit of execution containing one or more instructions, a recent blockhash, and one or more signatures. All instructions in a transaction execute sequentially and atomically—if any instruction fails, the entire transaction reverts. Transactions have a 1,232-byte size limit (matching IPv6 MTU) and a default 200,000 CU budget.

Próximos conceitos para explorar

Continue a cadeia de aprendizado em vez de parar em uma única definição.

Estes são os próximos conceitos que valem abrir se você quiser que este termo faça mais sentido dentro de um workflow real de Solana.

Modelo de Programação

Unidades de Computação (CU)

A measure of computational resources consumed by transaction execution, analogous to gas on Ethereum. Each BPF instruction costs CU; syscalls have predefined CU costs (e.g., SHA-256: 85 CU base + per-byte). Default per-instruction limit is 200,000 CU; max per-transaction is 1,400,000 CU. Priority fee cost = CU price × CU consumed.

Modelo de Programação

Transação

An atomic unit of execution containing one or more instructions, a recent blockhash, and one or more signatures. All instructions in a transaction execute sequentially and atomically—if any instruction fails, the entire transaction reverts. Transactions have a 1,232-byte size limit (matching IPv6 MTU) and a default 200,000 CU budget.

Segurança

Duplicate Mutable Accounts

A vulnerability where the same account is passed twice in the accounts list for a single instruction under different argument names, and the program writes to what it believes are two independent accounts, with the second write silently overwriting the first on the single underlying account in the runtime's account map. For example, if from and to in a transfer handler reference the same key, debiting from and crediting to nets out to a free credit. In native programs the check requires comparing account keys; Anchor automatically detects duplicate mutable accounts and returns an error when the same pubkey appears more than once in writable positions within a single instruction's account list.

Segurança

Closing Accounts Vulnerability

A vulnerability that arises when a program closes an account by zeroing its data and transferring lamports without setting the account's discriminator or data to a sentinel closed state before the end of the instruction, leaving a window within the same transaction where other instructions can still interact with the now-empty account. The Solana runtime only removes an account from the account set when its lamports reach zero at the end of a transaction, so mid-transaction the account still exists and a subsequent instruction can re-fund it and reinstate stale data, enabling an account revival attack. Anchor's close constraint writes a CLOSED_ACCOUNT_DISCRIMINATOR (8 bytes of 0xff) and uses a force-defund mechanism to prevent resurrection.

Termos relacionados

Siga os conceitos que realmente dão contexto a este termo.

Entradas de glossário só ficam úteis quando estão conectadas. Esses links são o caminho mais curto para ideias adjacentes.

Modelo de Programaçãocompute-units

Unidades de Computação (CU)

A measure of computational resources consumed by transaction execution, analogous to gas on Ethereum. Each BPF instruction costs CU; syscalls have predefined CU costs (e.g., SHA-256: 85 CU base + per-byte). Default per-instruction limit is 200,000 CU; max per-transaction is 1,400,000 CU. Priority fee cost = CU price × CU consumed.

Modelo de Programaçãotransaction

Transação

An atomic unit of execution containing one or more instructions, a recent blockhash, and one or more signatures. All instructions in a transaction execute sequentially and atomically—if any instruction fails, the entire transaction reverts. Transactions have a 1,232-byte size limit (matching IPv6 MTU) and a default 200,000 CU budget.

Mais na categoria

Permaneça na mesma camada e continue construindo contexto.

Essas entradas vivem ao lado do termo atual e ajudam a página a parecer parte de um grafo maior, não um beco sem saída.

Segurança

Missing Signer Check

A vulnerability where a program accepts an account in a privileged role (e.g., admin, authority, payer) without verifying that the account actually signed the transaction, allowing any caller to impersonate that authority by simply passing the target pubkey as an instruction account. In native Solana programs, the check requires asserting account.is_signer == true; in Anchor, the Signer<'info> type enforces this automatically. Exploitation lets an attacker bypass all access control gated on authority equality checks, making it one of the most critical and commonly audited vulnerabilities in Solana programs.

Segurança

Missing Owner Check

A vulnerability where a program deserializes and trusts account data without first confirming that the account is owned by the expected program, allowing an attacker to substitute a maliciously crafted account owned by a different program whose byte layout happens to satisfy the deserialization. On Solana, every account stores a 32-byte owner field set to the program that created it; native programs must assert account.owner == &expected_program_id, while Anchor's Account<'info, T> wrapper performs this check automatically. Failure to validate ownership can lead to complete auth bypass if an attacker can construct a fake account whose data parses into a struct with elevated privileges.

Segurança

Arbitrary CPI

A vulnerability where a program accepts an arbitrary program account from the caller and invokes it via Cross-Program Invocation (CPI) without verifying it matches a known, trusted program ID, effectively letting an attacker substitute a malicious program that executes under the victim program's authority or manipulates accounts the victim program passes to it. A common pattern is accepting a token_program account without checking it equals spl_token::ID, so the attacker passes a lookalike program that records or drains account data. Prevention requires hard-coding or explicitly checking the program ID before every CPI call.

Segurança

PDA Substitution Attack

A vulnerability where a program derives a PDA internally but accepts an externally supplied account as that PDA without re-deriving and comparing the address, allowing an attacker to pass a different PDA (derived from attacker-controlled seeds) that the program will treat as legitimate. Because PDAs are deterministic, the only way to guarantee account identity is to call Pubkey::find_program_address (or equivalent) with the expected seeds inside the program and assert the result equals the supplied key. Anchor's seeds and bump constraints on the Account type automate this re-derivation and equality check.