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

Stackoverflow during YamlStream.Load() #1027

Closed
mschessler opened this issue Dec 26, 2024 · 1 comment
Closed

Stackoverflow during YamlStream.Load() #1027

mschessler opened this issue Dec 26, 2024 · 1 comment

Comments

@mschessler
Copy link

Describe the bug
While fuzzing another library an input was found that leads to an stack overflow in YamlStreams Load() funktion.
I would assume thats not wanted behaviour.
Stacktrace:

Stack overflow.
Repeat 19262 times:

at YamlDotNet.RepresentationModel.YamlAliasNode.Equals(System.Object)

at System.Collections.Generic.ObjectEqualityComparer1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Equals(System.__Canon, System.__Canon) at System.Collections.Generic.Dictionary2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].FindValue(System.__Canon)
at System.Collections.Generic.Dictionary2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_Item(System.__Canon) at YamlDotNet.Helpers.OrderedDictionary2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].get_Item(System.__Canon)
at YamlDotNet.RepresentationModel.YamlMappingNode.ResolveAliases(YamlDotNet.RepresentationModel.DocumentLoadingState)
at YamlDotNet.RepresentationModel.DocumentLoadingState.ResolveAliases()
at YamlDotNet.RepresentationModel.YamlDocument..ctor(YamlDotNet.Core.IParser)
at YamlDotNet.RepresentationModel.YamlStream.Load(YamlDotNet.Core.IParser)
at YamlDotNet.RepresentationModel.YamlStream.Load(System.IO.TextReader)
at FuzzTest.Program.Main(System.String[])

To Reproduce
var yamlText = "{ *a, &a }";
var yamlstream = new YamlStream();
var reader = new StringReader(yamlText);
yamlstream.Load(reader);

@mschessler
Copy link
Author

Closing duplicate: #375

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

No branches or pull requests

1 participant