Vixen
02b45cc4
csharp
public sealed class InputBufferTarget

The input buffer, taking a run of inputs from a client that is not to be trusted.

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

Remarks

The second thing a client can make a server do work for. An RPC is the first; this is the other, and it arrives every tick rather than when a player does something. The header is a tick and a count, and the count says how many more structures to decode — a length a caller supplies, which is the shape of every packet bug the reader was built to refuse.

What is really under test is the memory bound. A client controls the tick it stamps its inputs with, so it can ask the server to hold a second of its future, or an hour of it. Capacity is what turns that into a refusal, and the allowance below is what says so: no input, however constructed, may make this allocate in proportion to the numbers inside it.

Fields and properties (4)

  • 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 Held

    What the buffer is holding, which must stay inside its capacity.

  • public long HeldCap

    The most it may hold.

Methods (4)

  • 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 void Maintain()

    Puts the target back into a state worth fuzzing, before the next case.

  • public long Run(ReadOnlySpan<byte> input)

    Pushes one input through the decoder.

Used by (1)

  • FuzzTargetsVixen.Net.Fuzz