Ollama Divide By Zero vulnerability
A malicious user could upload a crafted GGUF model file to an Ollama server, causing a division by zero in the ggufPadding function. This crashes the server, resulting in a denial of service.
github.com/ollama/ollama
Originally disclosed on huntr
A vulnerability in ollama/ollama versions <=0.3.14 allows a malicious user to upload and create a customized GGUF model file on the Ollama server. This can lead to a division by zero error in the ggufPadding function, causing the server to crash and resulting in a Denial of Service (DoS) attack.
From the GitHub Advisory Database (GHSA-9gcr-28rp-cc24, 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 ggufPadding function does not validate that a value read from the uploaded GGUF file is non-zero before using it as a divisor.
Impact
A malicious user could crash the Ollama server, causing a denial of service for other users.
What the attacker needed
Ability to upload a GGUF model file
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.
Ollama is a tool for running large language models locally. A model file is a data file that describes the model's structure. A division by zero is a programming error that happens when a number is divided by zero, which most programs cannot handle and will crash. Here, a specially crafted model file triggers this error, crashing the server so it cannot serve other users.
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.