Skip to content

Unpacking.UnpackObject hangs permanently #309

@Metalnem

Description

@Metalnem

Unpacking.UnpackObject method sometimes hangs permanently. Here is the full C# program that reproduces such behavior:

using System.IO;

namespace MsgPack.Run
{
  public class Program
  {
    public static void Main(string[] args)
    {
      var bytes = new byte[]
      {
        0x8E, 0x80, 0xFF, 0x74, 0x6F, 0x0E, 0x41, 0xDF, 0x74,
        0x6F, 0x0E, 0x41, 0x90, 0x00, 0x00, 0x0F, 0x7B, 0x20,
        0x8E, 0x80, 0xFF, 0x74, 0x6F, 0x0E, 0x41, 0xDF, 0x74,
        0x6F, 0x0E, 0x41, 0x90, 0x00, 0x00, 0xF8, 0x7A, 0x20,
        0x70, 0x68, 0x00, 0xDF, 0x6F, 0x90, 0x1C, 0x6F, 0x74,
        0x6F, 0x61, 0x70, 0x68, 0x00, 0xDF, 0x52, 0x90, 0x1C,
        0x6F, 0x74, 0x6F, 0x61, 0x6D, 0x01, 0x02, 0x03, 0x04
      };

      using (var stream = new MemoryStream(bytes))
      {
        Unpacking.UnpackObject(stream);
      }
    }
  }
}

Found via SharpFuzz.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions