Skip to content

Restrict atom count in deserializer to 1 million#605

Merged
bnoordhuis merged 2 commits intoquickjs-ng:masterfrom
bnoordhuis:so-many-atoms
Oct 18, 2024
Merged

Restrict atom count in deserializer to 1 million#605
bnoordhuis merged 2 commits intoquickjs-ng:masterfrom
bnoordhuis:so-many-atoms

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

Otherwise it's too easy to tie up too many resources (cpu, memory) by crafting inputs with a very large atom count (up to 4 billion.)

This may need some finetuning. If the limit proves too restrictive for very large snapshots, we can make it relative to the size of the input.

Otherwise it's too easy to tie up too many resources (cpu, memory) by
crafting inputs with a very large atom count (up to 4 billion.)

This may need some finetuning. If the limit proves too restrictive for
very large snapshots, we can make it relative to the size of the input.
@bnoordhuis bnoordhuis merged commit 966dbfc into quickjs-ng:master Oct 18, 2024
@bnoordhuis bnoordhuis deleted the so-many-atoms branch October 18, 2024 08:01
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.

2 participants