[PR #13609] Repair an integer division by zero vulnerability in ggufPadding #14292

Open
opened 2026-04-13 00:50:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13609
Author: @ylwango613
Created: 1/3/2026
Status: 🔄 Open

Base: mainHead: repair_alignment


📝 Commits (1)

  • 047b86d Repair an integer division by zero vulnerability in ggufPadding

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 fs/ggml/gguf.go (+5 -0)

📄 Description

Fixed the divide-by-zero issue caused by directly using alignment in gguf. Added the following code:
// Validate alignment
if alignment == 0 {
return fmt.Errorf("invalid general.alignment: cannot be zero")
}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13609 **Author:** [@ylwango613](https://github.com/ylwango613) **Created:** 1/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `repair_alignment` --- ### 📝 Commits (1) - [`047b86d`](https://github.com/ollama/ollama/commit/047b86d0f4c0530304ab5052b74d2bd0fe7b9f5e) Repair an integer division by zero vulnerability in ggufPadding ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `fs/ggml/gguf.go` (+5 -0) </details> ### 📄 Description Fixed the divide-by-zero issue caused by directly using alignment in gguf. Added the following code: // Validate alignment if alignment == 0 { return fmt.Errorf("invalid general.alignment: cannot be zero") } --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:50:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#14292