<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hi!<br>
</div>
<div><br>
</div>
<div>I found bug (using live.2018.02.18, but in 2020.06.25 RTPInterface.cpp is the same).</div>
<div>It occures when proxyServer used with -t flag (RTP-over-TCP with backend server).</div>
<div>In some cases, like client disconnects or reconnects, backend socket deregistering RTP channels, and only RTCP channels have staying alive. But, before proxied server got PAUSE command, it continue send RTP packets. Proxy interpret packets channel ID as
wrong: ("Saw nonexistent stream channel id") and continues search dollar from next byte. And, when found dollar (in RTP payload of not actual channel), it wrongly interpret next byte as channel Id. And when that wrong ID equals one of alive RTCP channels,
next two bytes interprets as packet size. So, trying to get that wrongly detected amount of bytes leds to infinitely calling of RTCPInstance::incomingReportHandler1() with same fNumBytesAlreadyRead, that exceeding maxRTCPPacketSize.</div>
<div><br>
</div>
<div>Logs looks like:</div>
<div>SocketDescriptor(socket 5)::tcpReadHandler(): Saw nonexistent stream channel id: 0x60<br>
SocketDescriptor(socket 5)::tcpReadHandler(): Saw '$'<br>
SocketDescriptor(socket 5)::tcpReadHandler(): Saw nonexistent stream channel id: 0x19<br>
SocketDescriptor(socket 5)::tcpReadHandler(): Saw '$'<br>
SocketDescriptor(socket 5)::tcpReadHandler(): Saw nonexistent stream channel id: 0x00<br>
SocketDescriptor(socket 5)::tcpReadHandler(): Saw '$'<br>
SocketDescriptor(socket 5)::tcpReadHandler(): reading 46071 bytes on channel 3<br>
SocketDescriptor(socket 5)::tcpReadHandler(): reading 44615 bytes on channel 3<br>
RTCPInstance error: Hit limit when reading incoming packet over TCP. (fNumBytesAlreadyRead (1456) >= maxRTCPPacketSize (1456)). The remote endpoint is using a buggy implementation of RTP/RTCP-over-TCP. Please upgrade it!<br>
SocketDescriptor(socket 5)::tcpReadHandler(): reading 44615 bytes on channel 3<br>
RTCPInstance error: Hit limit when reading incoming packet over TCP. (fNumBytesAlreadyRead (1456) >= maxRTCPPacketSize (1456)). The remote endpoint is using a buggy implementation of RTP/RTCP-over-TCP. Please upgrade it!<br>
SocketDescriptor(socket 5)::tcpReadHandler(): reading 44615 bytes on channel 3<br>
RTCPInstance error: Hit limit when reading incoming packet over TCP. (fNumBytesAlreadyRead (1456) >= maxRTCPPacketSize (1456)). The remote endpoint is using a buggy implementation of RTP/RTCP-over-TCP. Please upgrade it!</div>
<div>and so on.<br>
</div>
<div><br>
</div>
<div>I think, after getting not actual channel ID, we needs drop full packaet, and only after that try get dollar of next one.<br>
</div>
<div><br>
</div>
<div><em>Best regards, Andrey L.</em><em></em><em></em></div>
<div><br>
<div style="font-family:Tahoma; font-size:13px"></div>
</div>
</div>
</body>
</html>