cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.23k stars 476 forks source link

Failed to extract RTP packets with "./test/rtp_decoder" on Raspberry Pi 3. #437

Closed tarask1nRing closed 5 years ago

tarask1nRing commented 5 years ago

[Description]: Failed to extract RTP packets with ./test/rtp_decoder on Raspberry Pi 3.

[Step to reproduce]:

  1. test.pcap should contain any SRTP packets
  2. Run ./test/rtp_decoder -t 0 -e 128 -k a928ea6dcb646c9700ef2e38d832169302f15cd48e4efb2154714887023d <~/test.pcap
  3. There is no output.

[Suggested solution]: The root cause is that the memory for policy structure is not zeroed on initialize. So, it has random data in enc_xtn_hdr, enc_xtn_hdr_count fields which leads to error in srtp_crypto_alloc method.

srtp_policy_t policy = {0};

pabuhler commented 5 years ago

Hi @tarask1nRing , this is I guess just a change to the rtp_decoder test application correct ?

Are you able to submit a patch?

tarask1nRing commented 5 years ago

@pabuhler Yes, sure #438