REDHAT-BUG-2428828: Null Pointer Dereference
Ollama 0.11.5-rc0 through current version 0.13.5 contain a null pointer dereference vulnerability in the multi-modal model image processing functionality. When processing base64-encoded image data via the /api/chat endpoint, the application fails to validate that the decoded data represents valid media before passing it to the mtmdhelperbitmapinitfrombuf function. This function can return NULL for malformed input, but the code does not check this return value before dereferencing the pointer in subsequent operations. A remote attacker can exploit this by sending specially crafted base64 image data that decodes to invalid media, causing a segmentation fault and crashing the runner process. This results in a denial of service condition where the model becomes unavailable to all users until the service is restarted.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ollamato a version that resolves this vulnerability.Fixed in 0.13.5 - Upgrade
Upgrade
ollamato a version that resolves this vulnerability.Fixed in 0.11.5-rc0
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2428828?
The severity of REDHAT-BUG-2428828 is high with a score of 7.
How do I fix REDHAT-BUG-2428828?
To fix REDHAT-BUG-2428828, update Ollama to the latest version where the vulnerability has been addressed.
What type of vulnerability is identified in REDHAT-BUG-2428828?
REDHAT-BUG-2428828 identifies a null pointer dereference vulnerability.
What impact does REDHAT-BUG-2428828 have on the application?
The impact of REDHAT-BUG-2428828 is the potential for application crashes due to invalid image data processing in the /api/chat endpoint.
In which versions of Ollama is REDHAT-BUG-2428828 present?
REDHAT-BUG-2428828 is present in Ollama versions from 0.11.5-rc0 to the current version 0.13.5.