39 Commits

Author SHA1 Message Date
brandtr
554becd7bf Add fuzzer for FlexfecSender.
BUG=webrtc:5654
NOTRY=true

Review-Url: https://codereview.webrtc.org/2433373003
Cr-Commit-Position: refs/heads/master@{#14937}
2016-11-07 06:45:20 +00:00
pbos
c6b4e547a8 Add fuzzer for H264 bitstream parser.
BUG=webrtc:6454
R=kthelgason@webrtc.org

Review-Url: https://codereview.webrtc.org/2430703002
Cr-Commit-Position: refs/heads/master@{#14936}
2016-11-05 10:10:27 +00:00
brandtr
869e7cd8e7 Rename ProducerFec to UlpfecGenerator.
BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2449783002
Cr-Commit-Position: refs/heads/master@{#14847}
2016-10-31 12:27:10 +00:00
brandtr
e405d9b8df Add a fuzzer for FlexfecReceiver.
Specifically set max_len to 2000, to simulate multi-packet insertions.

BUG=webrtc:5654
NOTRY=true

Review-Url: https://codereview.webrtc.org/2391263002
Cr-Commit-Position: refs/heads/master@{#14656}
2016-10-18 08:18:12 +00:00
kjellander
e40a7ee007 GN: Exclude suppressions of Chromium Clang warnings for Chromium builds.
These suppressions are causing GN errors when Chromium targets are depending
directly on WebRTC targets (needed for https://codereview.chromium.org/2413103004)

BUG=webrtc:4256
NOTRY=True

Review-Url: https://codereview.webrtc.org/2408133008
Cr-Commit-Position: refs/heads/master@{#14644}
2016-10-17 06:56:20 +00:00
henrik.lundin
58466f6d97 Relanding "Setting up an RTP input fuzzer for NetEq"
The original CL (https://codereview.webrtc.org/2315633002) was
reverted since the fuzzer depended on gflags and files in the
resources folder; neither of this is allowed for a fuzzer test in
Chromium. This new version streamlines the dependencies, and changes
the test to generate a sinusoid input audio signal instead of reading
from a file.

Original commit message:
This CL introduces a new fuzzer target neteq_rtp_fuzzer that
manipulates the RTP header fields before inserting the packets into
NetEq. A few helper classes are also introduced.

BUG=webrtc:5447
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_chromium_rel_ng;master.tryserver.chromium.android:android_compile_dbg,linux_android_rel_ng;master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.chromium.mac:mac_chromium_rel_ng,ios-device

Review-Url: https://codereview.webrtc.org/2384423002
Cr-Commit-Position: refs/heads/master@{#14523}
2016-10-05 09:27:48 +00:00
skvlad
cc91d284e4 Moved RtcEventLog files from call/ to logging/
The RtcEventLog headers need to be accessible from any place which needs
logging, and the implementation needs access to data structures that are
logged.

After a discussion in the code review, we all agreed to move the RtcEventLog implementation into its own top level directory - which I called "logging/" in expectation that other types of logging may have similar requirements. The directory contains two main build targets - "rtc_event_log_api", which is just rtc_event_log.h, that has no external dependencies and can be used from anywhere, and "rtc_event_log_impl" which contains the rest of the implementation and has many dependencies (more in the future).

The "api" target can be referenced from anywhere, while the "impl" target is only needed at the place of instantiation (currently Call, soon to be moved to PeerConnection by https://codereview.webrtc.org/2353033005/).

This change allows using RtcEventLog in the p2p/ directory, so that we
can log STUN pings and ICE state transitions.

BUG=webrtc:6393
R=kjellander@webrtc.org, kwiberg@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org

Review URL: https://codereview.webrtc.org/2380683005 .

Cr-Commit-Position: refs/heads/master@{#14485}
2016-10-04 01:31:32 +00:00
brandtr
cada34cd98 Fuzzer for FEC header readers.
BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2265493002
Cr-Commit-Position: refs/heads/master@{#14470}
2016-10-03 09:02:53 +00:00
charujain
89a3a1a363 Moved Gn target rtc_event_log to one directory above.
This is done to ensure GN targets are placed in the same directory as of the source files.

BUG=webrtc:6412
NOTRY=True

Review-Url: https://codereview.webrtc.org/2365383004
Cr-Commit-Position: refs/heads/master@{#14411}
2016-09-28 07:49:04 +00:00
kjellander
b62dbbe985 GN: Change rtc_source_set targets --> rtc_static_library
This changes most non-test related rtc_source_set targets to be
rtc_static_library instead. Targets without any .cc files are excluded.
This should bring back the build behavior we used to have with GYP
(i.e. same symbols exported in the libjingle_peerconnection.a file, which
are used by some downstream projects).

After doing an Android build with these changes:
$ nm --defined-only -g -C out/Release/lib.unstripped/libjingle_peerconnection_so.so | grep -i createpeerconnectionf
00077c51 T Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnectionFactory
$ nm --defined-only -g -C out/Release/obj/webrtc/api/libjingle_peerconnection.a | grep -i createpeerconnectionf
00000001 T webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, webrtc::AudioDeviceModule*, cricket::WebRtcVideoEncoderFactory*, cricket::WebRtcVideoDecoderFactory*)
00000001 T webrtc::CreatePeerConnectionFactory()

See https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md#Note-on-static-libraries
for more details on this.

NOTICE: This should be further cleaned up in the future, to reduce
binary bloat and unnecessary linking time. Right now it's more
important to restore the desired build output though.

BUG=webrtc:6410, chromium:630755

Review-Url: https://codereview.webrtc.org/2361623004
Cr-Commit-Position: refs/heads/master@{#14364}
2016-09-23 07:38:58 +00:00
phoglund
667bd07bd3 Enable turn, sdp, pseudotcp and stun parse/validator fuzzers.
These were blocked on GN work; should be good to go
now. If they break the WebRTC FYI bots, there's more
work to be done. Verified they build locally at least.

Setting no-try because all bots went green except broken android bots.

BUG=6368
NOTRY=true

Review-Url: https://codereview.webrtc.org/2342843002
Cr-Commit-Position: refs/heads/master@{#14256}
2016-09-16 12:05:44 +00:00
henrik.lundin
22c8d5a3e0 Revert of Setting up an RTP input fuzzer for NetEq (patchset #2 id:20001 of https://codereview.webrtc.org/2315633002/ )
Reason for revert:
Broke all Chromium libFuzzer builds
https://bugs.chromium.org/p/chromium/issues/detail?id=645069

Original issue's description:
> Setting up an RTP input fuzzer for NetEq
>
> This CL introduces a new fuzzer target neteq_rtp_fuzzer that
> manipulates the RTP header fields before inserting the packets into
> NetEq. A few helper classes are also introduced.
>
> BUG=webrtc:5447
> NOTRY=True
>
> Committed: https://crrev.com/2d273f1e97cd5030ed1686f27ce1118291b66395
> Cr-Commit-Position: refs/heads/master@{#14103}

TBR=ivoc@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5447

Review-Url: https://codereview.webrtc.org/2328483002
Cr-Commit-Position: refs/heads/master@{#14131}
2016-09-08 12:00:41 +00:00
ehmaldonado
4016a0b2e8 GN: Move variables from //build_overrides/webrtc.gni to //webrtc/build/webrtc.gni
There is no clear reason to have them in build_overrides, and
webrtc/build seems to be a better place.

Also, delete build_overrides/webrtc.gni

NOTRY=True
BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2309253004
Cr-Commit-Position: refs/heads/master@{#14108}
2016-09-07 13:50:23 +00:00
henrik.lundin
2d273f1e97 Setting up an RTP input fuzzer for NetEq
This CL introduces a new fuzzer target neteq_rtp_fuzzer that
manipulates the RTP header fields before inserting the packets into
NetEq. A few helper classes are also introduced.

BUG=webrtc:5447
NOTRY=True

Review-Url: https://codereview.webrtc.org/2315633002
Cr-Commit-Position: refs/heads/master@{#14103}
2016-09-07 12:57:34 +00:00
ehmaldonado
e9cc686293 GN Templates: Move common_inherited_config to the template.
Remove common_inherited_config from the targets and add it to the
template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2311843002
Cr-Commit-Position: refs/heads/master@{#14069}
2016-09-05 13:10:23 +00:00
ehmaldonado
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
Stefan Holmer
13181035bc Reland: Add BWE plot to event log analyzer.
The plot is constructed by actually running the congestion controller with
the logged rtp headers and rtcp feedback messages to reproduce the same behavior
as in the real call.

R=phoglund@webrtc.org, terelius@webrtc.org

Review URL: https://codereview.webrtc.org/2193763002 .

Cr-Commit-Position: refs/heads/master@{#13574}
2016-07-29 12:49:04 +00:00
stefan
bded44b79b Add a CongestionController fuzzer.
BUG=

Review-Url: https://codereview.webrtc.org/2157783002
Cr-Commit-Position: refs/heads/master@{#13497}
2016-07-18 16:26:15 +00:00
katrielc
44905cf49f Add a fuzzer for the pseudoTCP implementation used by chromoting. This
found chromium:620694.

Unfortunately it depends on unsafe GN targets, so do not build in
Chromium.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2129603003
Cr-Commit-Position: refs/heads/master@{#13407}
2016-07-07 12:52:29 +00:00
katrielc
1d4fefbbaf Reland of https://codereview.webrtc.org/2044523002.
Landing these in WebRTC under a guard so they don't build in
Chromium. The guard can be removed once Chromium has migrated to use the
new GN targets.

BUG=webrtc:6081
NOTRY=true

Review-Url: https://codereview.webrtc.org/2117183005
Cr-Commit-Position: refs/heads/master@{#13397}
2016-07-06 15:02:09 +00:00
katrielc
262ba77d78 Add fuzzer for TURN unwrap.
This is called on received network packets if dump_rtp_packets_ is on.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2126463002
Cr-Commit-Position: refs/heads/master@{#13394}
2016-07-06 12:59:34 +00:00
katrielc
d4bcdad263 Add a libfuzzer for RtpHeaderParser.
NOTRY=true

Review-Url: https://codereview.webrtc.org/2062103002
Cr-Commit-Position: refs/heads/master@{#13271}
2016-06-23 10:50:43 +00:00
katrielc
bddc94bca2 Add fuzzer corpora.
- RTP and RTCP corpora for existing fuzzers
  - STUN/SDP/pseudotcp for upcoming ones
  - STUN/SDP tokens as well

NOTRY=true

Review-Url: https://codereview.webrtc.org/2082943002
Cr-Commit-Position: refs/heads/master@{#13253}
2016-06-22 13:43:30 +00:00
katrielc
839315beca Use the Chromium libfuzzer template instead of rolling our own.
This lets us use their fancy features, including seed_corpus which is
super handy.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2081683002
Cr-Commit-Position: refs/heads/master@{#13216}
2016-06-20 13:04:01 +00:00
katrielc
81ca73586e Remove new fuzzers until their GN targets work properly in Chromium.
Chromium uses gn gen --check, which doesn't like some of the includes
used in the new gn targets the fuzzers use. This breaks Chromium
libfuzzer compiles, for which there isn't yet a webrtc FYI bot.

I'm working on fixing the includes, at which point these can come back.

BUG=chromium:618901
NOTRY=true

Review-Url: https://codereview.webrtc.org/2053293002
Cr-Commit-Position: refs/heads/master@{#13098}
2016-06-10 09:59:46 +00:00
Peter Boström
555cfe9e6e Use relative paths for api/p2p fuzzers.
BUG=
R=aizatsky@chromium.org
TBR=katrielc@webrtc.org

Review URL: https://codereview.webrtc.org/2053093002 .

Cr-Commit-Position: refs/heads/master@{#13095}
2016-06-09 21:25:25 +00:00
katrielc
7b496e026b Add fuzzers for SDP and STUN parsing.
The STUN fuzzer is split into two parts: validation and parsing. The
latter should be able to handle invalid packets instead of assuming
the validation deals with them, since an adversary could set a valid
HMAC on an invalid packet.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2044523002
Cr-Commit-Position: refs/heads/master@{#13050}
2016-06-06 16:45:32 +00:00
danilchap
1edb7ab7bd RtpPacket class introduced.
BUG=webrtc:1994, webrtc:5261

Review URL: https://codereview.webrtc.org/1841453004

Cr-Commit-Position: refs/heads/master@{#12444}
2016-04-20 12:25:19 +00:00
Peter Boström
ba3e25e502 Simple RTCP receiver fuzzer.
Doesn't utilize the clock or any callbacks out of the receiver but
should still be useful to test input packet parsing.

BUG=webrtc:4771
R=danilchap@webrtc.org

Review URL: https://codereview.webrtc.org/1716143002 .

Cr-Commit-Position: refs/heads/master@{#11717}
2016-02-23 10:35:41 +00:00
henrik.lundin
fd2be2718d Fuzzer tests for AudioDecoder's DecodeRedundant and IncomingPacket
This CL adds new fuzzer tests for the DecodeRedundant and
IncomingPacket methods of AudioDecoder. In practice, only Opus has
DecodeRedundant, and only iSAC has IncomingPacket. Did some minor work
to generalize the helper function reading values from the fuzzed
input.

BUG=webrtc:5306
R=pbos@webrtc.org
NOTRY=true

Review URL: https://codereview.webrtc.org/1607173003

Cr-Commit-Position: refs/heads/master@{#11533}
2016-02-09 08:00:32 +00:00
Peter Boström
1e0cfd9a46 Add VP8 and H264 depacketizer fuzzers.
Also removes listing of targets in webrtc_fuzzers which is very prone to
not being up to date. They're not required for ClusterFuzz integration
or building locally. This also means that adding fuzzers won't require
approval outside the fuzzers directory.

BUG=webrtc:4771
R=kjellander@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1518973003 .

Cr-Commit-Position: refs/heads/master@{#11067}
2015-12-17 13:28:28 +00:00
Peter Boström
78315b9813 Reland of Base webrtc fuzzers on a template. (patchset #1 id:1 of https://codereview.webrtc.org/1528043002/ )
Reason for revert:
Found missing public_configs that broke Chromium libfuzzer build.

Original issue's description:
> Revert of Base webrtc fuzzers on a template. (patchset #1 id:1 of https://codereview.webrtc.org/1524993002/ )
>
> Reason for revert:
> Suspect this is breaking the build:
> https://build.chromium.org/p/chromium.fyi/builders/Libfuzzer%20Upload%20Linux/builds/1576/steps/compile/logs/stdio
>
> Original issue's description:
> > Base webrtc fuzzers on a template.
> >
> > Removes noisy dependencies on webrtc_fuzzer_main and removal of
> > find_bad_constructs, removes 1-6 lines of gn per fuzzer target.
> >
> > BUG=webrtc:4771
> > R=kjellander@webrtc.org
> >
> > Committed: https://crrev.com/5ea3da2cbbb0710f9617fb0627c0c4258437b09f
> > Cr-Commit-Position: refs/heads/master@{#11022}
>
> TBR=kjellander@webrtc.org,pbos@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4771
>
> Committed: https://crrev.com/5e0218c66e0686dd00719f1e53f844efa94c9f42
> Cr-Commit-Position: refs/heads/master@{#11032}

TBR=kjellander@webrtc.org,tommi@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4771

Review URL: https://codereview.webrtc.org/1522003005 .

Cr-Commit-Position: refs/heads/master@{#11035}
2015-12-15 20:58:00 +00:00
tommi
5e0218c66e Revert of Base webrtc fuzzers on a template. (patchset #1 id:1 of https://codereview.webrtc.org/1524993002/ )
Reason for revert:
Suspect this is breaking the build:
https://build.chromium.org/p/chromium.fyi/builders/Libfuzzer%20Upload%20Linux/builds/1576/steps/compile/logs/stdio

Original issue's description:
> Base webrtc fuzzers on a template.
>
> Removes noisy dependencies on webrtc_fuzzer_main and removal of
> find_bad_constructs, removes 1-6 lines of gn per fuzzer target.
>
> BUG=webrtc:4771
> R=kjellander@webrtc.org
>
> Committed: https://crrev.com/5ea3da2cbbb0710f9617fb0627c0c4258437b09f
> Cr-Commit-Position: refs/heads/master@{#11022}

TBR=kjellander@webrtc.org,pbos@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4771

Review URL: https://codereview.webrtc.org/1528043002

Cr-Commit-Position: refs/heads/master@{#11032}
2015-12-15 18:24:05 +00:00
Peter Boström
5ea3da2cbb Base webrtc fuzzers on a template.
Removes noisy dependencies on webrtc_fuzzer_main and removal of
find_bad_constructs, removes 1-6 lines of gn per fuzzer target.

BUG=webrtc:4771
R=kjellander@webrtc.org

Review URL: https://codereview.webrtc.org/1524993002 .

Cr-Commit-Position: refs/heads/master@{#11022}
2015-12-15 09:46:27 +00:00
Stefan Holmer
4c1093b86f Add FEC producer fuzzing and a unittest for one of the issues found.
BUG=webrtc:4800
R=pbos@webrtc.org

Review URL: https://codereview.webrtc.org/1522463002 .

Cr-Commit-Position: refs/heads/master@{#10990}
2015-12-11 17:25:56 +00:00
Henrik Lundin
fe32a76d60 Create fuzzer tests for audio decoders
This change adds fuzzer tests for iLBC, iSAC fix and float, and
Opus. The fuzzer function takes a random input vector and splits it
into a number of payloads. The lengths of the payloads is also
determined by the random vector. The payloads are decoded with the
decoders.

BUG=webrtc:5306
R=kjellander@webrtc.org, pbos@webrtc.org

Review URL: https://codereview.webrtc.org/1499093002 .

Cr-Commit-Position: refs/heads/master@{#10932}
2015-12-08 10:27:34 +00:00
Peter Boström
871c419596 Add fuzzing of VP8 QP parsing.
BUG=webrtc:4771
R=asapersson@webrtc.org, kjellander@webrtc.org

Review URL: https://codereview.webrtc.org/1469123004 .

Cr-Commit-Position: refs/heads/master@{#10806}
2015-11-26 13:52:28 +00:00
Peter Boström
89d658f6b4 Fix fuzzer breakage in Chromium.
Removes log disabling under Chromium which doesn't compile due to
missing LS_INFO in the override log implementation.

Also removes dependency on webrtc/test/BUILD.gn which doesn't build in
Chromium (due to third_party/gflags not being present). Instead the
no-op implementation of field_trials in system_wrappers is used.

BUG=chromium:561667, webrtc:4771
R=kjellander@webrtc.org
TBR=henrikg@webrtc.org

Review URL: https://codereview.webrtc.org/1473713004 .

Cr-Commit-Position: refs/heads/master@{#10793}
2015-11-25 20:58:43 +00:00
Peter Boström
62e9bda7bf Implement fuzzing of VP9 depacketization.
Provides an example for how to use fuzzing within the webrtc tree.

BUG=webrtc:4771
R=aizatsky@chromium.org, asapersson@webrtc.org, kjellander@webrtc.org

Review URL: https://codereview.webrtc.org/1463523002 .

Cr-Commit-Position: refs/heads/master@{#10752}
2015-11-23 14:12:13 +00:00