Skip to content

ggml : prevent integer overflow in tensor size calculation #14595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

Yuuoniy
Copy link
Contributor

@Yuuoniy Yuuoniy commented Jul 9, 2025

Add a check to prevent integer overflow when accumulating tensor sizes in gguf_init_from_file_impl.
This avoids potential oob read/write from malformed GGUF files.

@Yuuoniy Yuuoniy requested a review from JohannesGaessler as a code owner July 9, 2025 12:03
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jul 9, 2025
Nexesenex added a commit to Nexesenex/croco.cpp that referenced this pull request Jul 9, 2025
Nexesenex added a commit to Nexesenex/croco.cpp that referenced this pull request Jul 9, 2025
@slaren slaren merged commit 26a48ad into ggml-org:master Jul 9, 2025
48 checks passed
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request Jul 9, 2025
* origin/master:
ggml : prevent integer overflow in gguf tensor size calculation (ggml-org#14595)
model : add skt/A.X-4.0 model vocabulary (ggml-org#14589)
llama : remove unintended whitespace (ggml-org#14592)
model : add support for Falcon-H1 family (ggml-org#14534)
convert : fix smollm3 jinja template (ggml-org#14586)
ryan-mangeno pushed a commit to ryan-mangeno/llama.cpp that referenced this pull request Jul 9, 2025
qnixsynapse pushed a commit to menloresearch/llama.cpp that referenced this pull request Jul 10, 2025
qnixsynapse pushed a commit to menloresearch/llama.cpp that referenced this pull request Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants