Skip to content

ElasticsearchException.writeStackTraces does not check nested depth of suppressed exceptions #93943

@thecoop

Description

@thecoop

Whilst StreamOutput.writeException does keep track of the nested depth of causal exceptions, ElasticsearchException doesn't use this for suppressed exceptions. This means it is possible for StreamOutput.writeException to throw a stack overflow when writing out very deeply nested suppressed exceptions, or a loop of suppressed exceptions (however that occurred).

This bug is present on 7.17 as well as 8.x branches

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions