Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Issue 2123553002: Add a fuzzer for srtp_unprotect in libsrtp. (Closed)

Created:
4 years, 5 months ago by katrielc
Modified:
4 years, 5 months ago
Reviewers:
mmoroz
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a fuzzer for srtp_unprotect in libsrtp. This is called on any SRTP packet received, and decrypts it in place. For now the fuzzer uses a hard-coded key and SSRC, but future modifications could generalise this in a number of ways. It does read more than one packet, since there could be bugs lurking in the state maintained by the parser (for example, the ID of each packet is stored for replay protection). Committed: https://crrev.com/346b92100d3ebfe43ec8c226d8bf0fa226c22527 Cr-Commit-Position: refs/heads/master@{#403893}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Move comment along with moved code. #

Patch Set 4 : MODULAR IS ALWAYS BETTER #

Total comments: 17

Patch Set 5 : Code review #

Total comments: 8

Patch Set 6 : Use a global message and ASAN poison it. #

Total comments: 6

Patch Set 7 : Don't manually poison; MSAN will catch it. #

Total comments: 6

Patch Set 8 : Don't waste bytes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -0 lines) Patch
M testing/libfuzzer/fuzzers/BUILD.gn View 1 chunk +10 lines, -0 lines 0 comments Download
A testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc View 1 2 3 4 5 6 7 1 chunk +142 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
katrielc
New fuzzer for you :) The trybot doesn't like it, but I'm guessing it's an ...
4 years, 5 months ago (2016-07-04 17:12:49 UTC) #2
mmoroz
https://codereview.chromium.org/2123553002/diff/60001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/60001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode19 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:19: kLibSrtpFuzzerNone, Chromium coding style says to use MACRO_STYLE naming ...
4 years, 5 months ago (2016-07-05 14:20:19 UTC) #3
katrielc
https://codereview.chromium.org/2123553002/diff/60001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/60001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode19 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:19: kLibSrtpFuzzerNone, On 2016/07/05 14:20:19, mmoroz wrote: > Chromium coding ...
4 years, 5 months ago (2016-07-05 15:04:40 UTC) #4
mmoroz
https://codereview.chromium.org/2123553002/diff/60001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/60001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode58 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:58: } On 2016/07/05 15:04:40, katrielc wrote: > On 2016/07/05 ...
4 years, 5 months ago (2016-07-05 16:06:21 UTC) #5
katrielc
https://codereview.chromium.org/2123553002/diff/80001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/80001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode43 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:43: unsigned char key[30] = {0x41, 0x42, 0x43, 0x44, 0x45, ...
4 years, 5 months ago (2016-07-05 16:26:03 UTC) #6
mmoroz
https://codereview.chromium.org/2123553002/diff/80001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/80001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode138 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:138: srtp_unprotect(session, &reinterpret_cast<rtp_msg_t*>(raw_packet)->header, On 2016/07/05 16:26:03, katrielc wrote: > On ...
4 years, 5 months ago (2016-07-05 16:40:10 UTC) #7
katrielc
https://codereview.chromium.org/2123553002/diff/80001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/80001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode138 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:138: srtp_unprotect(session, &reinterpret_cast<rtp_msg_t*>(raw_packet)->header, On 2016/07/05 16:40:10, mmoroz wrote: > On ...
4 years, 5 months ago (2016-07-05 17:47:31 UTC) #8
mmoroz
https://codereview.chromium.org/2123553002/diff/100001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/100001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode161 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:161: size_t body_size = packet_size - std::min(packet_size, header_size); I think ...
4 years, 5 months ago (2016-07-06 09:44:22 UTC) #9
katrielc
Thanks for the detailed reviewing! https://codereview.chromium.org/2123553002/diff/100001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/100001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode161 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:161: size_t body_size = packet_size ...
4 years, 5 months ago (2016-07-06 10:36:03 UTC) #10
mmoroz
LGTM with a couple of comments, feel to land after addressing them. https://codereview.chromium.org/2123553002/diff/120001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc ...
4 years, 5 months ago (2016-07-06 12:13:14 UTC) #11
katrielc
Will land this in a moment. https://codereview.chromium.org/2123553002/diff/120001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc File testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc (right): https://codereview.chromium.org/2123553002/diff/120001/testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc#newcode93 testing/libfuzzer/fuzzers/libsrtp_fuzzer.cc:93: return 0; On ...
4 years, 5 months ago (2016-07-06 12:23:37 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2123553002/140001
4 years, 5 months ago (2016-07-06 12:28:27 UTC) #15
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 5 months ago (2016-07-06 13:23:40 UTC) #16
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-06 13:23:42 UTC) #17
commit-bot: I haz the power
4 years, 5 months ago (2016-07-06 13:25:59 UTC) #19
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/346b92100d3ebfe43ec8c226d8bf0fa226c22527
Cr-Commit-Position: refs/heads/master@{#403893}

Powered by Google App Engine
This is Rietveld 408576698