Freezing the Autonomous Agent Layer: How I Found a Critical DoS
A crafted recursive structure in a DAG platform's autonomous agent triggers caused exponential expansion during payload hashing and logging, holding a global mutex lock and stalling all agent transactions. An attacker could cause a denial of service for the execution layer.
Published on medium.com
In the world of decentralized systems, availability is just as critical as integrity. Recently, I was auditing a well-known Directed Acyclic Graph (DAG) platform that supports Autonomous Agents (AAs) — Turing-complete smart contracts that execute logic in response to incoming messages.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the payload hashing and logging functions traversed a deeply recursive structure without memoization, causing exponential time complexity while holding a global lock.
Impact
The attack could stall the network's processing of autonomous agents, causing measured SLA violations and preventing legitimate AA transactions, though standard payments and consensus remained unaffected.
What the attacker needed
Ability to submit a transaction to the network
The fix
The team implemented a WeakMap-based memoization solution for payload hashing and length calculations, which was fixed and delivered a significant speedup.
How it was found
- Craft a PoC that uses exponential DAG expansion by nesting triggers in a self-referential pattern.
- Send the payload to a node, which acquires the 'aa_triggers' lock.
- The node attempts to log the state and calculate a hash for the response.
- The hashing and logging traverse the recursive structure without memoization, causing CPU to hang and hold the lock indefinitely.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A denial-of-service (DoS) attack makes a system unavailable to legitimate users. Here, a specially crafted message caused the software to get stuck in a long calculation while holding a lock, so other transactions had to wait. The fix made the calculation faster by remembering results.
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.