High
github
·
GHSA-jwjp-4649-v8jp
SIPSorcery vulnerable to Denial of Service via out-of-bounds read in SCTP SACK chunk parsing
Published Aug 12, 2026
CVSS 7.5
Summary
SctpSackChunk.ParseChunk reads the numGapAckBlocks and numDuplicateTSNs fields (each up to 65535) directly from an attacker-controlled SCTP SACK chunk and loops that many times reading 4 bytes per iteration, with no validation of the counts against the chunk length or the receive buffer. A single crafted SACK chunk from a negotiated WebRTC peer forces reads past the end of the 262144-byte receive buffer, raising IndexOutOfRangeException, which is not caught by the recoverable handler and terminates the dedicated SCTP receive thread — permanently killing the SCTP association and all data channels.
Root Cause
src/SIPSorcery/net/SCTP/Chunks/SctpSackChunk.cs:
ushort numGapAckBlocks = NetConvert.ParseUInt16(buffer, startPosn + 8);(:141)ushort numDuplicateTSNs = NetConvert.ParseUInt16(buffer, startPosn + 10);(:142)- gap-ack loop (:146) and duplicate-TSN loop (:154) index the buffer via
NetConvert.ParseUInt16/32(buffer[posn], no bounds check —sys/Net/NetConvert.cs:30,41).SctpPacket.ParseChunks(SctpPacket.cs:195-203) only validateschunkLength >= 4andposn+chunkLength =4andposn+chunkLength 262144; buffer is 262144 (DEFAULT_ADVERTISED_RECEIVE_WINDOW, SctpAssociation.cs:62).numGapAckBlocksalone suffices — the dup-TSN loop is not needed. DoReceivecatch split: recoverablecatch(ApplicationException)at :345 (continue) vs genericcatch(Exception)at :356 (break);_receiveThreadstarted once at :176.
Affected Versions
`nuget:SIPSorcery
Affected AI Products
cursor