The Wayback Machine - https://web.archive.org/web/20220702140315/https://github.com/opensearch-project/OpenSearch/issues/3268
Skip to content
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

Set a maximum depth for nested queries #3268

Open
kkhatua opened this issue May 10, 2022 · 3 comments
Open

Set a maximum depth for nested queries #3268

kkhatua opened this issue May 10, 2022 · 3 comments
Labels
enhancement good first issue Indexing & Search

Comments

@kkhatua
Copy link
Member

@kkhatua kkhatua commented May 10, 2022

Is your feature request related to a problem? Please describe.
A recent review of the dependency libraries showed that CVE-2020-36518 (jackson-databind) can lead to creation of a large depth of nested objects and potentially cause a stack overflow.

Describe the solution you'd like
While the immediate fix is upgrading the affected library to a patched version of the library (#2599) we need to constrain this depth in general. This would be the fastest mitigation to protect against other possible vulnerabilities that can be exploited like this through other means, or even by accidental generation through a script.

Describe alternatives you've considered
None. Introduction of a max limit (cluster level setting) would be sufficient to address the issue in general, in context of exploits and in the context of rogue queries generated by accident.

Additional context
None

@kkhatua kkhatua added enhancement untriaged labels May 10, 2022
@dblock
Copy link
Member

@dblock dblock commented May 10, 2022

Since #2599 was merged and backported to 2.x, 1.x (please check whether it was released as part of 1.3.2 and 2.0-rc1), do I correctly understand that while we don't have to add a limit for this particular problem, we want it for general hygiene to avoid similar issues in the future?

@kkhatua
Copy link
Member Author

@kkhatua kkhatua commented May 10, 2022

Since #2599 was merged and backported to 2.x, 1.x (please check whether it was released as part of 1.3.2 and 2.0-rc1), do I correctly understand that while we don't have to add a limit for this particular problem, we want it for general hygiene to avoid similar issues in the future?

Yes, that is correct. Having a parameter-based limit allows for mitigating the risk.

@dblock dblock added the good first issue label May 10, 2022
@nishp77
Copy link

@nishp77 nishp77 commented May 28, 2022

Hi team, I'm very new this project and I would like to ask you if you could tell the best way to begin and get to know general overview of it (architecture). I didn't jackson was a parser for java until now, I would like to ask on jackson-databind what is really is? I did some googling but don't know about the underneath of the library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Indexing & Search
4 participants