Skip to content

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

Merged
tphoney merged 1 commit intopuppetlabs:masterfrom
mbaynton:range_dos
Jul 23, 2019
Merged

Limit the maximum array size produced by range().#1023
tphoney merged 1 commit intopuppetlabs:masterfrom
mbaynton:range_dos

Conversation

@mbaynton
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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