Skip to content

[ZipArchiveFuzzer]: ArgumentOutOfRangeException in ReadEncryptionSaltIfNeeded #131228

Description

@MihaZupan
System.ArgumentOutOfRangeException: Stream length must be non-negative and less than the maximum array length 2147483591 - origin. (Parameter 'offset')
   at System.IO.MemoryStream.Seek(Int64 offset, SeekOrigin loc)
   at System.IO.Compression.ZipArchiveEntry.GetOffsetOfCompressedData()
   at System.IO.Compression.ZipArchiveEntry.ReadEncryptionSaltIfNeeded()
   at System.IO.Compression.ZipArchive.ReadCentralDirectory()
   at System.IO.Compression.ZipArchive.EnsureCentralDirectoryRead()
   at System.IO.Compression.ZipArchive.get_Entries()
   at DotnetFuzzing.Fuzzers.ZipArchiveFuzzer.TestArchive(Byte[] buffer, Int32 length, Boolean async)
   at DotnetFuzzing.Fuzzers.ZipArchiveFuzzer.FuzzTarget(ReadOnlySpan`1 bytes)
   at DotnetFuzzing.Program.<>c__DisplayClass1_0.<RunFuzzer>b__0(ReadOnlySpan`1 bytes)
   at SharpFuzz.Fuzzer.LibFuzzer.Run(ReadOnlySpanAction action, Boolean ignoreExceptions)

Input: crash-1b521a024f3d128660a7dc2d3fe9423b19c4952c.txt

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions