Hi!

I found bug (using live.2018.02.18, but in 2020.06.25 RTPInterface.cpp is the 
same).
It occures when proxyServer used with -t flag (RTP-over-TCP with backend 
server).
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.

Logs looks like:
SocketDescriptor(socket 5)::tcpReadHandler(): Saw nonexistent stream channel 
id: 0x60
SocketDescriptor(socket 5)::tcpReadHandler(): Saw '$'
SocketDescriptor(socket 5)::tcpReadHandler(): Saw nonexistent stream channel 
id: 0x19
SocketDescriptor(socket 5)::tcpReadHandler(): Saw '$'
SocketDescriptor(socket 5)::tcpReadHandler(): Saw nonexistent stream channel 
id: 0x00
SocketDescriptor(socket 5)::tcpReadHandler(): Saw '$'
SocketDescriptor(socket 5)::tcpReadHandler(): reading 46071 bytes on channel 3
SocketDescriptor(socket 5)::tcpReadHandler(): reading 44615 bytes on channel 3
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!
SocketDescriptor(socket 5)::tcpReadHandler(): reading 44615 bytes on channel 3
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!
SocketDescriptor(socket 5)::tcpReadHandler(): reading 44615 bytes on channel 3
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!
and so on.

I think, after getting not actual channel ID, we needs drop full packaet, and 
only after that try get dollar of next one.

Best regards, Andrey L.

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
  • [Live-devel] RTP-over-TCP... Лисовой Андрей Витальевич

Reply via email to