-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fuzzing add seed, new target and remove bloat
Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
- Loading branch information
Showing
14 changed files
with
57 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
// SPDX-License-Identifier: MIT | ||
package dtls | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func FuzzUnmarshalBinary(f *testing.F) { | ||
f.Fuzz(func(t *testing.T, data []byte) { | ||
deserialized := &State{} | ||
_ = deserialized.UnmarshalBinary(data) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> | ||
// SPDX-License-Identifier: MIT | ||
|
||
package extension | ||
|
||
import "testing" | ||
|
||
func FuzzUnmarshal(f *testing.F) { | ||
f.Add([]byte{0x00}) | ||
f.Add([]byte{1, 6, 8, 3, 88, 12, 2, 47}) | ||
f.Add([]byte{0x0, 0xa, 0x0, 0x4, 0x0, 0x2, 0x0, 0x1d}) | ||
f.Add([]byte{0x00, 0x0b, 0x00, 0x02, 0x01, 0x00}) | ||
f.Add([]byte{0x00, 0x0d, 0x00, 0x08, 0x00, 0x06, 0x04, 0x03, 0x05, 0x03, 0x06, 0x03}) | ||
f.Add([]byte{0x00, 0x0e, 0x00, 0x05, 0x00, 0x02, 0x00, 0x01, 0x00}) | ||
|
||
f.Fuzz(func(t *testing.T, data []byte) { | ||
_, _ = Unmarshal(data) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+25 Bytes
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawCertificateRequest.raw
Binary file not shown.
Binary file added
BIN
+75 Bytes
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawCertificateVerify.raw
Binary file not shown.
Binary file added
BIN
+74 Bytes
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawClientHello.raw
Binary file not shown.
Binary file added
BIN
+33 Bytes
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawClientKeyExchange.raw
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawFinished.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
Binary file added
BIN
+23 Bytes
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawHelloVerifyRequest.raw
Binary file not shown.
Binary file added
BIN
+40 Bytes
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawServerHello.raw
Binary file not shown.
Binary file added
BIN
+144 Bytes
pkg/protocol/handshake/testdata/fuzz/FuzzDtlsHandshake/rawServerKeyExchange.raw
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
���serializedState��LocalEpochRemoteEpochLocalRandom��RemoteRandom��CipherSuiteIDMasterSecretSequenceNumberSRTPProtectionProfilePeerCertificates��IdentityHintSessionIDLocalConnectionIDRemoteConnectionIDIsClient��[32]uint8��@��[][]uint8������ e&M����K��'����/��kZO6g��MP��I����������} e&M����������@��Cs.=��5Z��{����rg:[����Le����+0y���*��[�\B�GEv�5�ٕ=�u�CwP9�r�48r�y��;k.E |