Skip to content

Stream ID reserved bit not masked in frame deserialiser #7

@phluid61

Description

@phluid61

File: lib/ruby-h2/frame-deserialiser.rb:50

The unpacked stream ID retains the reserved high bit from the wire. RFC 7540 §4.1 states the reserved bit "MUST be ignored when receiving."

A peer that sets this bit (even incorrectly) would produce a stream ID of e.g. 0x80000001 instead of 1, causing stream lookups to fail.

Fix: mask the stream ID after unpacking: sid &= 0x7FFF_FFFF.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions