-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Request to index a large deeply nested doc that can potentially cause stack overflow and node to crash #5195
Labels
bug
Something isn't working
Comments
nkumar04
changed the title
Request to index a large deeply nested doc that can potentially cause stack overflow and node to crash[BUG]
[BUG] Request to index a large deeply nested doc that can potentially cause stack overflow and node to crash
Nov 10, 2022
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Nov 10, 2022
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Nov 10, 2022
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Nov 10, 2022
Thanks for reporting this! I see you have started on a fix, looking forward to it. |
6 tasks
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Nov 30, 2022
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Nov 30, 2022
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Nov 30, 2022
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Dec 1, 2022
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Dec 5, 2022
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Dec 5, 2022
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Jan 4, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Jan 4, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Jan 4, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Jan 5, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Jan 5, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Jan 5, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Jan 5, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 8, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 8, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 8, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 8, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 8, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 23, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 23, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 23, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
pushed a commit
to nkumar04/OpenSearch
that referenced
this issue
Feb 23, 2023
Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]>
shwetathareja
pushed a commit
that referenced
this issue
Feb 28, 2023
* Adding depth check in doc parser for deep nested document Fixing the issue (#5195) Signed-off-by: Nikhil Kumar <[email protected]>
nkumar04
added a commit
to nkumar04/OpenSearch
that referenced
this issue
Mar 3, 2023
…-project#5199) * Adding depth check in doc parser for deep nested document Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]> (cherry picked from commit 950b86a)
6 tasks
nkumar04
added a commit
to nkumar04/OpenSearch
that referenced
this issue
Mar 3, 2023
…-project#5199) * Adding depth check in doc parser for deep nested document Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]> (cherry picked from commit 950b86a)
nkumar04
added a commit
to nkumar04/OpenSearch
that referenced
this issue
Mar 3, 2023
…-project#5199) * Adding depth check in doc parser for deep nested document Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]> (cherry picked from commit 950b86a)
6 tasks
reta
pushed a commit
that referenced
this issue
Mar 3, 2023
) * Adding depth check in doc parser for deep nested document Fixing the issue (#5195) Signed-off-by: Nikhil Kumar <[email protected]> (cherry picked from commit 950b86a)
mingshl
pushed a commit
to mingshl/OpenSearch-Mingshl
that referenced
this issue
Mar 24, 2023
…-project#5199) * Adding depth check in doc parser for deep nested document Fixing the issue (opensearch-project#5195) Signed-off-by: Nikhil Kumar <[email protected]> Signed-off-by: Mingshi Liu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
User with proper permission to OpenSearch endpoint can create a large deeply nested request that can potentially cause stack overflow and node to crash. For example, see the request below. Current implementation recursively goes inside each nested filed object and tries to parse it.
To Reproduce
Steps to reproduce the behavior:
Use the python script (create_doc.py) below to generate a deeply nested doc.
Create a nested doc:
python3 create_doc.py 10000
Add the document for indexing:
curl -XPUT "localhost:9200/test-index-1/_doc/1?pretty" -H 'Content-Type: application/json' -d @data.json
Output from local run:
Expected behavior
Exception while parsing the request doc should be handled gracefully without crashing the OpenSearch application.
Additional context
There are few settings in place to limit the number of field mappings (created manually or dynamically) and prevent documents from causing a mapping explosion. For example, INDEX_MAPPING_DEPTH_LIMIT_SETTING. Document parser parses the document and feed it to the mapper service to create or update the mapping tied to the index. Settings to limit the number of field mappings are enforced while creating or updating the mapping for index dynamically. But the prerequisite for these validation is successful completion of document parsing stage. Hence, we want to make sure that any exception at the time of parsing of a malformed document is handled gracefully
The text was updated successfully, but these errors were encountered: