Reasoning LLMs, like DeepSeek-R1, trained via large-scale reinforcement learning(RL) have demonstrated remarkable reasoning capabilities. However, they will be trapped in over-reasoning even endless thinking when processing some special queries. With such never-end thinking queries, hackers can crack down a model server in a cheaper DDoS way for that a single query would occupy the resources until reaching maximal tokens constraint. This catastrophe bug, never-end thinking query, will undermine the open-source development eco-system relies on reasoning LLMs. In this report, we release a reasoning attack pipeline cracking LLM Reasoning models, finding those over-reasoning queries. Worse still, those queries can transfer across the same series of distilled models. We do hope the community could find solution to the bug soon preventing from being exposure to potential threats.
Following figure shows our optimizing pipeline.
- the reasoning model will not generate the end thinking token
</think>
- the same over-reasoning query can transfer across the same series of distilled models.
- the reasoning model would repeat some sequences until running out of tokens.
- the open-source development eco-system relying on reasoning LLMs is under danger of a new DDoS attack
we exhibit some typical reasoning attack demo manipulating the DeepSeek-R1 series of models generating extremely long thinking CoT process. The attack prompt "树中两条路径之间的距离" can manipulate the whole DeepSeek-R1 series of models generate endless CoT until running out of max token length constraint.
deepseek.mp4
qwen-7B.mp4
qwen-32B.mp4
default.mp4
Encountering over-reasoning attack query, the reasoning model would repeat some sequences until running out of tokens, shown in following figure, the purple background marks out the repetitive sequence in response.
The over-reasoning attack queries can persistently occupy relatively massive computing resources, however, the hackers only pay for it with tiny network resources. We run a toy experiment on comparing over-reasoning queries and normal queries computing resources occupation. We deploy DeepSeek-R1-Distill-Qwen-1.5B on a single Nvidia 4090 GPU, running over-reasoning query and normal query recording their GPU occupation as following. As shown in figure, with only a few over-reasoning request will take the whole GPU resource, it would be a nightmare that hacker take the property as a DDoS tactic to attack servers.
We suppose the exploration in RL training leads to the over-reasoning due to promoting exploration strategy during sparse reward training. For most normal common users' queries won't last long and repetitive CoT, so it's would be a temporary strategy to limit the maximum length of CoT, relieving malicious DDoS. For the long term, it's wiser to address the issue of unstably extending CoT length and complexity in RL training
We have discussed the basic character of never-end thinking query, but we still not demystify the fundamental causation of the never-end thinking query. We will continue working on its causation through its RL based training process and exploring potential defense methods like stable CoT extension.
- Jiayu Yao: [email protected]
- Kunpeng Ning: [email protected]