Ollama Divide by Zero Vulnerability
A divide-by-zero flaw in Ollama version v0.3.3 allows a crafted GGUF model with a malicious block_count type to crash the server. An attacker could cause a denial of service by importing such a model.
github.com/ollama/ollama
Originally disclosed on huntr
A divide by zero vulnerability exists in ollama/ollama version v0.3.3. The vulnerability occurs when importing GGUF models with a crafted type for block_count in the Modelfile. This can lead to a denial of service (DoS) condition when the server processes the model, causing it to crash.
From the GitHub Advisory Database (GHSA-2xf2-gjm6-g2c6, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the software does not validate the type of the block_count value before using it in a division operation, leading to a divide-by-zero error.
Impact
An attacker could cause a denial of service by crashing the Ollama server when it processes the malicious model.
What the attacker needed
Ability to import a crafted GGUF model
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 report has not been written yet. The Original tab links to the source.
A divide-by-zero error happens when a program tries to divide a number by zero, which is not allowed and causes it to crash. In this case, Ollama, a tool for running AI models, can be tricked into doing that by a specially crafted model file, making the service stop working for everyone.
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.