-
Notifications
You must be signed in to change notification settings - Fork 14k
Fix DoS / integer overflow #17381
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
Fix DoS / integer overflow #17381
Conversation
|
Since it's a publicly disclosed security issue, I'm pinging a lot of people for review since it's probably best to merge this one quickly. |
|
Fixes #17352 |
ggerganov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we can avoid including <optional> as it brings very little convenience while increasing the compile-time.
|
@ggerganov aight, changed the code to use UINT64_MAX as placeholder instead of using Also after some deliberations I reduced the threshold to 2000, I don't think of any real use-cases in which a higher threshold might be needed and this will help avoid more overhead. |
|
This change potentially made one of the server test to hangs on windows: https://github.com/ggml-org/llama.cpp/actions/runs/19537370292/job/55934647432 Same behavior observed when running the test locally on a windows machine. |
Limit repetitions to 5000 max, store stoul in
unsigned long.