Closed
Description
Description
These bugs were gathered while Fuzzing the parsing function with Sharpfuzz and AFL.
On bad inputs an HL7Exception should be thrown but other exceptions occur on some inputs.
Exceptions and Inputs
- ArgumentOutOfRange
b"" - System
b"MSH|0|||||||00|||2.7" - NullReference
b"MSHH0\r" - IndexOutOfRange
b"MSH|0|||||||||||0" - Regex
b"MSH|^\x01\0|||||0||ACK^\|||2.2^0\r0|0|2^V~\\r0|0|00\r0)0" - System
b"MSH|0|0|0|0|0|0|0|20\x7f|0|0|2.7" - Permanent Hang
b"MSH|^|||||||^A|||2.2\r^AA"
Environmental Details
- OS: Ubuntu 20.04
- Target Framework netstandard2.0, net35, probably across all
- Version 3.0.0 preview 2
Additional context
The permanent hang would potentially be DoS exploitable depending on what context the library is used in.
I will create a pull request that fixes these bugs and adds them as tests.