rgaufman / live555

A mirror of the live555 source code.
GNU Lesser General Public License v3.0
768 stars 370 forks source link

SEGV bug #40

Open mirzamomen opened 2 years ago

mirzamomen commented 2 years ago

There is a Null pointer bug in Live555 in this repo, triggered by a faulty multimedia file of type ".aac"

ASAN Output:

==2680==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000009c (pc 0x00000044b3a0 bp 0x60b00000a758 sp 0x7ffc65d15a40 T0)
    #0 0x44b39f in ADTSAudioFileServerMediaSubsession::createNewRTPSink(Groupsock*, unsigned char, FramedSource*) (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x44b39f)
    #1 0x4d70ce in OnDemandServerMediaSubsession::getStreamParameters(unsigned int, unsigned int, Port const&, Port const&, int, unsigned char, unsigned char, unsigned int&, unsigned char&, unsigned char&, Port&, Port&, void*&) (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x4d70ce)
    #2 0x416ae2 in RTSPServer::RTSPClientSession::handleCmd_SETUP(RTSPServer::RTSPClientConnection*, char const*, char const*, char const*) (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x416ae2)
    #3 0x41067a in RTSPServer::RTSPClientConnection::handleRequestBytes(int) (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x41067a)
    #4 0x40ae4d in GenericMediaServer::ClientConnection::incomingRequestHandler() (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x40ae4d)
    #5 0x40af10 in GenericMediaServer::ClientConnection::incomingRequestHandler(void*, int) (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x40af10)
    #6 0x514415 in BasicTaskScheduler::SingleStep(unsigned int) (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x514415)
    #7 0x518f0f in BasicTaskScheduler0::doEventLoop(char volatile*) (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x518f0f)
    #8 0x404bd9 in main (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x404bd9)
    #9 0x7febfa3b683f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
    #10 0x407108 in _start (/home/ubuntu/experiments/live555-cov/testProgs/testOnDemandRTSPServer+0x407108)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ??:0 ADTSAudioFileServerMediaSubsession::createNewRTPSink(Groupsock*, unsigned char, FramedSource*)
==2680==ABORTING

To reproduce:

1- Unzip the attached file 2- Copy the ".aac" file into testProgs/test.aac 3- Run the server as: ./testOnDemandRTSPServer 8554 4- Get connected to the server and try to play the multimedia

live_Nptr_test_id64.aac.zip