Skip to content

Limit the maximum array size produced by range(). #1023

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 23, 2019

Conversation

mbaynton
Copy link
Contributor

It is trivially easy to accidentally DOS a puppet master by requesting
a range larger than was intended, for example
range('host00/index.html', 'host25/index.html'). Because jruby's
implementation of unrolling the range is parallelized, this sort of
thing takes down the whole box.

The solution here is a simple sanity-check on it; we could get fancier
with a new argument specifying a larger size etc. if someone thinks it
needed.

It is trivially easy to accidentally DOS a puppet master by requesting
a range larger than was intended, for example
`range('host00/index.html', 'host25/index.html')`. Because jruby's
implementation of unrolling the range is parallelized, this sort of
thing takes down the whole box.

The solution here is a simple sanity-check on it; we could get fancier
with a new argument specifying a larger size etc. if someone thinks it
needed.
@mbaynton
Copy link
Contributor Author

This broke our 24-core 128gb puppetmaster today, for what it's worth.

@tphoney tphoney added the bugfix label Jul 23, 2019
@tphoney
Copy link
Contributor

tphoney commented Jul 23, 2019

Hi @mbaynton thanks for the fix, i think this is a sensible change. Merged to master ! 🎆

@tphoney tphoney merged commit ba8fb0f into puppetlabs:master Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants