From patchwork Thu Dec 6 20:20:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Steadmon X-Patchwork-Id: 10716727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C39EF18B8 for ; Thu, 6 Dec 2018 20:21:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B588F2EF83 for ; Thu, 6 Dec 2018 20:21:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A99612EFB0; Thu, 6 Dec 2018 20:21:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 247072EFAC for ; Thu, 6 Dec 2018 20:21:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725992AbeLFUVC (ORCPT ); Thu, 6 Dec 2018 15:21:02 -0500 Received: from mail-it1-f202.google.com ([209.85.166.202]:54966 "EHLO mail-it1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbeLFUVB (ORCPT ); Thu, 6 Dec 2018 15:21:01 -0500 Received: by mail-it1-f202.google.com with SMTP id v3so2085868itf.4 for ; Thu, 06 Dec 2018 12:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to; bh=gwZtDpoGnu21O01jfzVOUe1snbShvKUuZXtAmKAnEjk=; b=VeaoaeCvva3HBQwM24dgznE+acreCKopnPGUpG5V9k/9HHr0Xw7vLQR2ZJyMqHK+2E 9YMDfJMru00m0dtUGMFzPjpG0UTCdCqMoVMnpW1EMDnMjT+cwlA0SqmtzIcQrCq5CQht Ckm8dwtxkWF28OmQzYh72akm1XUTOMUFLEuniTjHkZI8UtmSeFnrqpXrXSjAKmAuswyc 0+PjcyWw6XGwTxvzQz3XmWiBr3Eisv1nAUd773kXEHHeWpbJVTlWwl/XfFkIQTg/ZTLs RCeCdHYJzW3OFNMpN0Xce66X+vCyTqEZ+DaK+Cvv+WUCySfmrKqnlHRIMaZKtov0Uija hcqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to; bh=gwZtDpoGnu21O01jfzVOUe1snbShvKUuZXtAmKAnEjk=; b=rsz8LK+zt76nKD2mrU3yw8wHK9YDua3mLvSya1h9m8VebMtd+ylOk1XFkUK5SZ9lt3 ogWLquuizJEQIe2dHCziS2RojMaNo+sKqIVseimq9qVRSt6s66Xmiq6SUFCm2fph49tC ycaWvXHysA6J6lcngGI2xXkXP8X5X6RNmc2/Y2zzEjg3LxRUEPtr7WGIdQP9INXYD2Fj RosWpi22Yco5e3aDTqJf1+qA92ooX7BPMqnu6x6OY5GmzwMVzHAlN/OG4hSjsuq1rhEl +YjXL+EubniNz+2ZZYtWYszn9/LEbcN4SWlyiwR/JmXmwRnta4rjI0Lgg4qD6JwQZlLx deFw== X-Gm-Message-State: AA+aEWb7PGzCbRHqC+u8CJwJ2Fx8jAznk9HeXKPqeH6MrhHpnG/XkKRJ f7jaRCy/Z8TaKG9M6EZqPkIn+vLzdswLx3e1sj1CgRoExFQliY2Jiff1he0JTjBUaoDal9n24jY cfaEjBzZlhXOJ5AJjtu8JkuLn6ZNTcI9E7+sXscCFetDlWuE/BF6Xrc9XSnlwswE= X-Google-Smtp-Source: AFSGD/V82kai32sy5qAxQfDWhWobJEOYyXTHBjFbcIovERJxcCe9KIYWZ21kCx4kqmIPvsECaRNzDe4cEg3crQ== X-Received: by 2002:a24:334e:: with SMTP id k75mr16256334itk.19.1544127660397; Thu, 06 Dec 2018 12:21:00 -0800 (PST) Date: Thu, 6 Dec 2018 12:20:53 -0800 In-Reply-To: Message-Id: <0b57ecbe1b6c72d95311ba1bb30ea1ed9fd7e3e5.1544127439.git.steadmon@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.20.0.rc2.403.gdbc3b29805-goog Subject: [PATCH v2 1/3] commit-graph, fuzz: Add fuzzer for commit-graph From: Josh Steadmon To: git@vger.kernel.org, gitster@pobox.com, stolee@gmail.com, avarab@gmail.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Breaks load_commit_graph_one() into a new function, parse_commit_graph(). The latter function operates on arbitrary buffers, which makes it suitable as a fuzzing target. Since parse_commit_graph() is only called by load_commit_graph_one() (and the fuzzer described below), we omit error messages that would be duplicated by the caller. Adds fuzz-commit-graph.c, which provides a fuzzing entry point compatible with libFuzzer (and possibly other fuzzing engines). Signed-off-by: Josh Steadmon --- .gitignore | 1 + Makefile | 1 + commit-graph.c | 53 ++++++++++++++++++++++++++++++--------------- commit-graph.h | 3 +++ fuzz-commit-graph.c | 16 ++++++++++++++ 5 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 fuzz-commit-graph.c diff --git a/.gitignore b/.gitignore index 0d77ea5894..8bcf153ed9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/fuzz-commit-graph /fuzz_corpora /fuzz-pack-headers /fuzz-pack-idx diff --git a/Makefile b/Makefile index 1a44c811aa..6b72f37c29 100644 --- a/Makefile +++ b/Makefile @@ -684,6 +684,7 @@ SCRIPTS = $(SCRIPT_SH_INS) \ ETAGS_TARGET = TAGS +FUZZ_OBJS += fuzz-commit-graph.o FUZZ_OBJS += fuzz-pack-headers.o FUZZ_OBJS += fuzz-pack-idx.o diff --git a/commit-graph.c b/commit-graph.c index 40c855f185..07dd410f3c 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -84,16 +84,10 @@ static int commit_graph_compatible(struct repository *r) struct commit_graph *load_commit_graph_one(const char *graph_file) { void *graph_map; - const unsigned char *data, *chunk_lookup; size_t graph_size; struct stat st; - uint32_t i; - struct commit_graph *graph; + struct commit_graph *ret; int fd = git_open(graph_file); - uint64_t last_chunk_offset; - uint32_t last_chunk_id; - uint32_t graph_signature; - unsigned char graph_version, hash_version; if (fd < 0) return NULL; @@ -108,27 +102,55 @@ struct commit_graph *load_commit_graph_one(const char *graph_file) die(_("graph file %s is too small"), graph_file); } graph_map = xmmap(NULL, graph_size, PROT_READ, MAP_PRIVATE, fd, 0); + ret = parse_commit_graph(graph_map, fd, graph_size); + + if (!ret) { + munmap(graph_map, graph_size); + close(fd); + exit(1); + } + + return ret; +} + +struct commit_graph *parse_commit_graph(void *graph_map, int fd, + size_t graph_size) +{ + const unsigned char *data, *chunk_lookup; + uint32_t i; + struct commit_graph *graph; + uint64_t last_chunk_offset; + uint32_t last_chunk_id; + uint32_t graph_signature; + unsigned char graph_version, hash_version; + + if (!graph_map) + return NULL; + + if (graph_size < GRAPH_MIN_SIZE) + return NULL; + data = (const unsigned char *)graph_map; graph_signature = get_be32(data); if (graph_signature != GRAPH_SIGNATURE) { error(_("graph signature %X does not match signature %X"), graph_signature, GRAPH_SIGNATURE); - goto cleanup_fail; + return NULL; } graph_version = *(unsigned char*)(data + 4); if (graph_version != GRAPH_VERSION) { error(_("graph version %X does not match version %X"), graph_version, GRAPH_VERSION); - goto cleanup_fail; + return NULL; } hash_version = *(unsigned char*)(data + 5); if (hash_version != GRAPH_OID_VERSION) { error(_("hash version %X does not match version %X"), hash_version, GRAPH_OID_VERSION); - goto cleanup_fail; + return NULL; } graph = alloc_commit_graph(); @@ -152,7 +174,8 @@ struct commit_graph *load_commit_graph_one(const char *graph_file) if (chunk_offset > graph_size - GIT_MAX_RAWSZ) { error(_("improper chunk offset %08x%08x"), (uint32_t)(chunk_offset >> 32), (uint32_t)chunk_offset); - goto cleanup_fail; + free(graph); + return NULL; } switch (chunk_id) { @@ -187,7 +210,8 @@ struct commit_graph *load_commit_graph_one(const char *graph_file) if (chunk_repeated) { error(_("chunk id %08x appears multiple times"), chunk_id); - goto cleanup_fail; + free(graph); + return NULL; } if (last_chunk_id == GRAPH_CHUNKID_OIDLOOKUP) @@ -201,11 +225,6 @@ struct commit_graph *load_commit_graph_one(const char *graph_file) } return graph; - -cleanup_fail: - munmap(graph_map, graph_size); - close(fd); - exit(1); } static void prepare_commit_graph_one(struct repository *r, const char *obj_dir) diff --git a/commit-graph.h b/commit-graph.h index 9db40b4d3a..813e7c19f1 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -54,6 +54,9 @@ struct commit_graph { struct commit_graph *load_commit_graph_one(const char *graph_file); +struct commit_graph *parse_commit_graph(void *graph_map, int fd, + size_t graph_size); + /* * Return 1 if and only if the repository has a commit-graph * file and generation numbers are computed in that file. diff --git a/fuzz-commit-graph.c b/fuzz-commit-graph.c new file mode 100644 index 0000000000..cf790c9d04 --- /dev/null +++ b/fuzz-commit-graph.c @@ -0,0 +1,16 @@ +#include "commit-graph.h" + +struct commit_graph *parse_commit_graph(void *graph_map, int fd, + size_t graph_size); + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + struct commit_graph *g; + + g = parse_commit_graph((void *)data, -1, size); + free(g); + + return 0; +} From patchwork Thu Dec 6 20:20:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Steadmon X-Patchwork-Id: 10716731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF2D313BF for ; Thu, 6 Dec 2018 20:21:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFB442EEA2 for ; Thu, 6 Dec 2018 20:21:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D44162EFAB; Thu, 6 Dec 2018 20:21:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BF992EF83 for ; Thu, 6 Dec 2018 20:21:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726007AbeLFUVF (ORCPT ); Thu, 6 Dec 2018 15:21:05 -0500 Received: from mail-io1-f74.google.com ([209.85.166.74]:44993 "EHLO mail-io1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbeLFUVF (ORCPT ); Thu, 6 Dec 2018 15:21:05 -0500 Received: by mail-io1-f74.google.com with SMTP id v8so1446495ioh.11 for ; Thu, 06 Dec 2018 12:21:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to; bh=GpOTn8OjOveC8Do/YSKuS56Kg/PX8WL3IGpZp04Wd9Q=; b=npKmt3fGNGuNpJpPd4UPN2g+s9dInItOp+K6jf66jq8O8IgJyDYZisufX4wid4oy+P Ooy4N2lLgGdelwmk/vKGDEHAJZwNuIbEgALWe0pG6JsIuo20SEE8lPhCpamYSrhhOe/y 9gm1V4bJDrppemmSc24D+SKjlUPK9eNOrVLCKvlpPytWB/U60EI3Fenr3p60WQWPWkXp ahWb8zBNJ/TmVRU+fd2kg+Egd1h6N+Z1ZuT0e+kTpfTGphbThrl5fv3T0HyT11lTUiR+ ku2sNHzCaW8/tWmZgjoxmnF58F9JYB5cipBV2WAbgTYMnoYmvp0NgwkFT2ReuiW3yETn aeyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to; bh=GpOTn8OjOveC8Do/YSKuS56Kg/PX8WL3IGpZp04Wd9Q=; b=T8KEtTPCQsrA/Do0ybEGpzLKefktrpjeizaSi2eZVFxJ89Pizr4Ubr3Q+9OdVncLyl sAnHr3+hsUKg2OuzA3Sq8iLP3H7i4u8LHSP/LwLO/wbhQ73Xc29y/AJfxIlqGidWk1ye KQF2PjzOa7lvM4DIIGsT9pEyBKaSVeNKikiby0uitr5suul+cl1sM0ZlQEWcOjTCTazp xCqK6RlSU8FhoKar0abEEq6/WGy1myKoGvqVz4mQn/RiVbQlNUsZLj4ETTlBXb8jDoLZ T4brPmGRzfqKyeBIim2+29uBwoRRP9IrKkB966noxB3qTIFzuMk0mD0tXHaGAsoPSniF GxWg== X-Gm-Message-State: AA+aEWYsoledfXrl7rVNNSzE0pTfSEybeDWKLJv7cgN4ULx/cGyQq7YA kAZyQrbl/qFpsDDEDsf3YzUws9weH4AYB8cuX+wccvu9VaHsAm+P+GWb5SD8VE6vmswE9Smep0D ViaW4BbZ5wUsqQbK9ULgim2wfJ6sgRa9qBYJR77jy4Ixc457+3KxzEkcVO7iTiro= X-Google-Smtp-Source: AFSGD/XtkeX2tCaTcQFre+lO7RekGz8UM3E4v5sgkK8TYEmyhGRC9C20RrZsu52vwx6Prvy4q0z7cwyfsWfMjw== X-Received: by 2002:a24:248d:: with SMTP id f135mr10844255ita.36.1544127663804; Thu, 06 Dec 2018 12:21:03 -0800 (PST) Date: Thu, 6 Dec 2018 12:20:54 -0800 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.20.0.rc2.403.gdbc3b29805-goog Subject: [PATCH v2 2/3] commit-graph: fix buffer read-overflow From: Josh Steadmon To: git@vger.kernel.org, gitster@pobox.com, stolee@gmail.com, avarab@gmail.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fuzz-commit-graph identified a case where Git will read past the end of a buffer containing a commit graph if the graph's header has an incorrect chunk count. A simple bounds check in parse_commit_graph() prevents this. Signed-off-by: Josh Steadmon --- commit-graph.c | 14 ++++++++++++-- t/t5318-commit-graph.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index 07dd410f3c..224a5f161e 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -165,10 +165,20 @@ struct commit_graph *parse_commit_graph(void *graph_map, int fd, last_chunk_offset = 8; chunk_lookup = data + 8; for (i = 0; i < graph->num_chunks; i++) { - uint32_t chunk_id = get_be32(chunk_lookup + 0); - uint64_t chunk_offset = get_be64(chunk_lookup + 4); + uint32_t chunk_id; + uint64_t chunk_offset; int chunk_repeated = 0; + if (chunk_lookup + GRAPH_CHUNKLOOKUP_WIDTH > + data + graph_size) { + error(_("chunk lookup table entry missing; graph file may be incomplete")); + free(graph); + return NULL; + } + + chunk_id = get_be32(chunk_lookup + 0); + chunk_offset = get_be64(chunk_lookup + 4); + chunk_lookup += GRAPH_CHUNKLOOKUP_WIDTH; if (chunk_offset > graph_size - GIT_MAX_RAWSZ) { diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 5fe21db99f..2503cb0345 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -384,6 +384,29 @@ corrupt_graph_and_verify() { test_i18ngrep "$grepstr" err } + +# usage: corrupt_and_zero_graph_then_verify +# Manipulates the commit-graph file at by inserting the data, +# then zeros the file starting at . Finally, runs +# 'git commit-graph verify' and places the output in the file 'err'. Tests 'err' +# for the given string. +corrupt_and_zero_graph_then_verify() { + corrupt_pos=$1 + data="${2:-\0}" + zero_pos=$3 + grepstr=$4 + orig_size=$(stat --format=%s $objdir/info/commit-graph) + cd "$TRASH_DIRECTORY/full" && + test_when_finished mv commit-graph-backup $objdir/info/commit-graph && + cp $objdir/info/commit-graph commit-graph-backup && + printf "$data" | dd of="$objdir/info/commit-graph" bs=1 seek="$corrupt_pos" conv=notrunc && + truncate --size=$zero_pos $objdir/info/commit-graph && + truncate --size=$orig_size $objdir/info/commit-graph && + test_must_fail git commit-graph verify 2>test_err && + grep -v "^+" test_err >err && + test_i18ngrep "$grepstr" err +} + test_expect_success 'detect bad signature' ' corrupt_graph_and_verify 0 "\0" \ "graph signature" @@ -484,6 +507,11 @@ test_expect_success 'detect invalid checksum hash' ' "incorrect checksum" ' +test_expect_success 'detect truncated graph' ' + corrupt_and_zero_graph_then_verify $GRAPH_BYTE_CHUNK_COUNT "\xff" \ + $GRAPH_CHUNK_LOOKUP_OFFSET "chunk lookup table entry missing" +' + test_expect_success 'git fsck (checks commit-graph)' ' cd "$TRASH_DIRECTORY/full" && git fsck && From patchwork Thu Dec 6 20:20:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Steadmon X-Patchwork-Id: 10716733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 318741759 for ; Thu, 6 Dec 2018 20:21:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 210062CF99 for ; Thu, 6 Dec 2018 20:21:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F6B72EF99; Thu, 6 Dec 2018 20:21:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9D132EF99 for ; Thu, 6 Dec 2018 20:21:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726005AbeLFUVH (ORCPT ); Thu, 6 Dec 2018 15:21:07 -0500 Received: from mail-it1-f202.google.com ([209.85.166.202]:44588 "EHLO mail-it1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbeLFUVH (ORCPT ); Thu, 6 Dec 2018 15:21:07 -0500 Received: by mail-it1-f202.google.com with SMTP id x82so2232548ita.9 for ; Thu, 06 Dec 2018 12:21:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to; bh=d3+vQhSqyaxygJlzhZeldNtlmUKr6M3Gb3T2Z59tjnY=; b=tI+Qrk2RTpqrguLl4P9iAllPhkdklXk88Fe+ShdpG4KKJDcajK/jy6iwjCOeNmsPYg bJ/AknrZnIdlYlpaEfmDn0FJYBHbV5f5EbtU2iwmyeCVT5Q8tGeGv6rUac42CJLtLxq0 JjBkuAcsCG/z6twuaWSiRSlz+Bfa8bJskTWfTD2rTNmS/Rmk7aVMZ7qZD0kfwRedc4+i 6Mcej4R4MlXEUgiepIbRAyefnPOmFyUbJ/p3Pe9t1NSATPUcFGfnt0DzIJghFalUQXqG MW/soMnqMA2wi8vIf2tV1Ti7i5iqOSw2KB+w3oLt741LFLDCDw5oVDO6JQb6/m5JuVbF ENtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to; bh=d3+vQhSqyaxygJlzhZeldNtlmUKr6M3Gb3T2Z59tjnY=; b=WmlTWuQc7lLCIQWNaeCs59rNWabfCewp3atRUQqC9qxLDM4+Ux2kkmCYfejyXDW08P lPq9IzcqhncoudV+QcIclZL52a/x0VLtGnFyOH9pDBJJngLSsg39EAare2bdvx3uEj9l Tzx4mGU/e3LHCMZq2LsbYKfwtSLn9lFwHmn7g3mzYL2YcNSYFTaL6gL9WNYogyADo0bx tQ9ZLaIa83cxfdpxd8UsdVoJFuJDHX1iu6UB4rsvAqJdpPtqX1Q7jnlOkJ4cKD2txQ7f TE++R6Cbqjc0B+QGS6iF5zTHj7VKIoM0RWouKazmtEIASZkTLL7Rx/+vvs8l2YjuCPk9 2hXQ== X-Gm-Message-State: AA+aEWaymedNa+hhaVjA8D+LdKYoECyTZT+yIYSvBq95/4dDejSS/BsE x0ledjSzDtEGxZ504n6S2UuXAYqfqarTldgBOJFT0wGq8yEy9kFRIVNEVYD1PZCfnpxsV027f2k plftHyn5ANTtaiETf/7IAuF+DRB3VWxjPDJEEoLoYbqNvagCxdQyc2i6AXkPV2XU= X-Google-Smtp-Source: AFSGD/WmLmCuohYEZ1z5jP/vPY4Cg6cDMHb90tVze3eSSDa6FTsNmnnRNjWDD4OrW4x5PdHk/EjtxBKgjtQvwQ== X-Received: by 2002:a24:dcb:: with SMTP id 194mr10261450itx.25.1544127666127; Thu, 06 Dec 2018 12:21:06 -0800 (PST) Date: Thu, 6 Dec 2018 12:20:55 -0800 In-Reply-To: Message-Id: <7519fc76df085ce8e34cbedde2814bf8ac12d7b5.1544127439.git.steadmon@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.20.0.rc2.403.gdbc3b29805-goog Subject: [PATCH v2 3/3] Makefile: correct example fuzz build From: Josh Steadmon To: git@vger.kernel.org, gitster@pobox.com, stolee@gmail.com, avarab@gmail.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Josh Steadmon --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b72f37c29..bbcfc2bc9f 100644 --- a/Makefile +++ b/Makefile @@ -3104,7 +3104,7 @@ cover_db_html: cover_db # An example command to build against libFuzzer from LLVM 4.0.0: # # make CC=clang CXX=clang++ \ -# FUZZ_CXXFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=address" \ +# CFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=address" \ # LIB_FUZZING_ENGINE=/usr/lib/llvm-4.0/lib/libFuzzer.a \ # fuzz-all #