update master-with-bazel from master branch

This commit is contained in:
BoringSSL Robot
2022-06-02 15:49:47 +00:00
85 changed files with 91 additions and 0 deletions
+1
View File
@@ -885,6 +885,7 @@
"src/fuzz/cert.cc",
"src/fuzz/client.cc",
"src/fuzz/decode_client_hello_inner.cc",
"src/fuzz/der_roundtrip.cc",
"src/fuzz/dtls_client.cc",
"src/fuzz/dtls_server.cc",
"src/fuzz/pkcs12.cc",
+1
View File
@@ -79,6 +79,7 @@
#include "internal.h"
#include "../delocate.h"
#include "../service_indicator/internal.h"
#include "../../internal.h"
+1
View File
@@ -64,6 +64,7 @@
#include "../../internal.h"
#include "../bn/internal.h"
#include "../ec/internal.h"
#include "../service_indicator/internal.h"
#include "internal.h"
@@ -15,6 +15,7 @@
#include <openssl/crypto.h>
#include <openssl/ec.h>
#include <openssl/ec_key.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/service_indicator.h>
+1
View File
@@ -30,3 +30,4 @@ fuzzer(dtls_client ssl)
fuzzer(ssl_ctx_api ssl)
fuzzer(session ssl)
fuzzer(decode_client_hello_inner ssl)
fuzzer(der_roundtrip)
+57
View File
@@ -0,0 +1,57 @@
/* Copyright (c) 2022, Google Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#include <stdlib.h>
#include <string.h>
#include <openssl/bytestring.h>
#include <openssl/ecdsa.h>
#include <openssl/mem.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) {
CBS cbs, body;
unsigned tag;
CBS_init(&cbs, buf, len);
if (CBS_get_any_asn1(&cbs, &body, &tag)) {
// DER has a unique encoding, so any parsed input should round-trip
// correctly.
size_t consumed = len - CBS_len(&cbs);
bssl::ScopedCBB cbb;
CBB body_cbb;
if (!CBB_init(cbb.get(), consumed) ||
!CBB_add_asn1(cbb.get(), &body_cbb, tag) ||
!CBB_add_bytes(&body_cbb, CBS_data(&body), CBS_len(&body)) ||
!CBB_flush(cbb.get()) ||
CBB_len(cbb.get()) != consumed ||
memcmp(CBB_data(cbb.get()), buf, consumed) != 0) {
abort();
}
}
ECDSA_SIG *sig = ECDSA_SIG_from_bytes(buf, len);
if (sig != NULL) {
uint8_t *enc;
size_t enc_len;
if (!ECDSA_SIG_to_bytes(&enc, &enc_len, sig) ||
enc_len != len ||
memcmp(buf, enc, len) != 0) {
abort();
}
OPENSSL_free(enc);
ECDSA_SIG_free(sig);
}
return 0;
}
@@ -0,0 +1 @@
0�
@@ -0,0 +1 @@
��3
@@ -0,0 +1 @@
0
@@ -0,0 +1 @@
メ�
@@ -0,0 +1 @@
0]
@@ -0,0 +1 @@
0 ;-:���
@@ -0,0 +1 @@
�鋿�ヤヤ
@@ -0,0 +1 @@
0+H[�
@@ -0,0 +1 @@
���3
@@ -0,0 +1 @@
��
@@ -0,0 +1 @@
0���
@@ -0,0 +1 @@
���ヤヤヤヤ
@@ -0,0 +1 @@
00E
@@ -0,0 +1 @@
wはウ
@@ -0,0 +1 @@
0<�
@@ -0,0 +1 @@
0�
@@ -0,0 +1 @@
�胲呍性栽�
@@ -0,0 +1 @@
0��
@@ -0,0 +1 @@
0�e
@@ -0,0 +1 @@
0��
@@ -0,0 +1 @@
0�����_