The lock_pool operation can be DoS
Submitted by shaflow2, also found by Spearmint
The lock_pool operation requires the creation of a lockEscrow account. However, a malicious actor could preemptively create the lockEscrow account, causing the create_lock_escrow transaction to fail and resulting in a Denial of Service (DoS) for the lock_pool operation.
Proof of Concept
During the lock_pool process, the create_lock_escrow function is called to create the lock_escrow account.
// Create Lock Escrow
let escrow_accounts = vec![
AccountMeta::new(ctx.accounts.pool.key(), false),
AccountMeta::new(ctx.accounts.lock_escrow.key(), false),
AccountMeta::new_readonly(ctx.accounts.fee_receiver.key(), false),
AccountMeta::new_readonly(ctx.accounts.lp_mint.key(), false),
AccountMeta::new(ctx.accounts.bonding_curve_sol_escrow.key(), true), // Bonding Curve Sol Escrow is the payer/signer
AccountMeta::new_readonly(ctx.accounts.system_program.key(), false),
];
let escrow_instruction = Instruction {
program_id: meteora_program_id,
accounts: escrow_accounts,
data: get_function_hash("global", "create_lock_escrow").into(),
};
invoke_signed(
&escrow_instruction,
&[
ctx.accounts.pool.to_account_info(),
ctx.accounts.lock_escrow.to_account_info(),
ctx.accounts.fee_receiver.to_account_info(),
ctx.accounts.lp_mint.to_account_info(),
ctx.accounts.bonding_curve_sol_escrow.to_account_info(), // Bonding Curve Sol Escrow is the payer/signer
ctx.accounts.system_program.to_account_info(),
],
bonding_curve_sol_escrow_signer_seeds,
)?;
However, the lock_escrow account is derived using the pool and owner as seeds, and its creation does not require the owner’s signature. This means that a malicious actor could preemptively create the lock_escrow account to perform a DoS attack on the lock_pool operation.
/// Accounts for create lock account instruction
#[derive(Accounts)]
pub struct CreateLockEscrow<'info> {
/// CHECK:
pub pool: UncheckedAccount<'info>,
/// CHECK: Lock account
#[account(
init,
seeds = [
"lock_escrow".as_ref(),
pool.key().as_ref(),
owner.key().as_ref(),
],
space = 8 + std::mem::size_of::<LockEscrow>(),
bump,
payer = payer,
)]
pub lock_escrow: UncheckedAccount<'info>,
/// CHECK: Owner account
@> pub owner: UncheckedAccount<'info>,
/// CHECK: LP token mint of the pool
pub lp_mint: UncheckedAccount<'info>,
/// CHECK: Payer account
#[account(mut)]
pub payer: Signer<'info>,
/// CHECK: System program.
pub system_program: UncheckedAccount<'info>,
}
Recommended mitigation steps
In the lock_pool process, check if the lock_escrow exists. If it exists, skip the creation process.
Kulture (Pump Science) confirmed
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity doS bug in Pump Science. Code4rena made it public on 26 February 2025. Found in the 2025-01-pump-science audit contest (finding H-01), also found by 1 other warden.
About DoS
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.