Vixen
02b45cc4
csharp
public sealed class WebSocketUpgradeTarget

The WebSocket upgrade, which runs before anything has authenticated.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The only part of that transport we parse. The framing above it is WebSocket.CreateFromStream — the runtime's, and deliberately not ours — so what is left is the RFC 6455 opening handshake: find the blank line, find a header in what came before it, take its value. Thirty lines, over bytes from a stranger, reached by opening a socket.

It became fuzzable by being made a function. It used to be a loop inside an async method reading from a NetworkStream, which cannot be handed a span — and the shape change fixed a real defect on the way past, because the loop decoded and split the entire accumulated buffer on every read.

Fields and properties (3)

  • public string Name

    What to call it on a command line and in a report.

  • public string What

    Which receive path this is, in one line.

  • public long SplitDisagreementCount

    Requests where reading in chunks disagreed with reading in one.

Methods (3)

  • public long AllowanceFor(int inputLength)

    How many bytes an input may cause to be allocated.

  • public void Seed(ICollection<byte[]> corpus)

    Adds well-formed inputs for the mutator to start from.

  • public long Run(ReadOnlySpan<byte> input)

    Pushes one input through the decoder.

Used by (1)

  • FuzzTargetsVixen.Net.Fuzz