Skip to content

Validate model variable sizes before allocation - #2091

Merged
jordimas merged 5 commits into
OpenNMT:masterfrom
jordimas:security/model-bin-loader-validation
Aug 30, 2026
Merged

Validate model variable sizes before allocation#2091
jordimas merged 5 commits into
OpenNMT:masterfrom
jordimas:security/model-bin-loader-validation

Conversation

@jordimas

@jordimas jordimas commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

CTranslate2 trusted model.bin tensor metadata before validation, allowing crafted models to trigger load-time crashes or out-of-bounds reads. This validates dimensions and payload sizes before allocation.

Thanks to Hyeonbell hy3onb3ll@gmail.com for responsibly reporting this issue.

@jordimas
jordimas force-pushed the security/model-bin-loader-validation branch from 92107fd to 55d4138 Compare August 29, 2026 16:46
@jordimas
jordimas merged commit 0cc7ea3 into OpenNMT:master Aug 30, 2026
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant