AFL may be downloaded from http://lcamtuf.coredump.cx/afl. At the time of
writing (August 2019), the latest version is 2.52b. AFL should be built as
per the instructions in the README file in the distribution. The LLVM-based
- instrumentation programs should also be build, as per the instructions in
+ instrumentation programs should also be built, as per the instructions in
the file llvm_mode/README.llvm (also in the distribution). Note that this
requires that LLVM be installed on the machine used for the fuzzing.
being fuzzed.
-# Once the interface has been decided, these need to be set in the
- configuration file used for the test. For example, if fuzzing Kea-dhcp4
+ configuration file used for the test. For example, to fuzz Kea-dhcp4
using the loopback interface "lo" and IPv4 address 10.53.0.1, the
configuration file would contain the following snippet:
@code
@endcode
Implementation is via an object of class "Fuzz". When created, it identifies
-an interface, adress and port on which Kea is listening and creates the
+an interface, address and port on which Kea is listening and creates the
appropriate address structures for these. The port is passed as an argument to
the constructor because at the point at which the object is constructed, that
information is readily available. The interface and address are picked up from
@code{.unparsed}
while (__AFL_LOOP(count)) {
@endcode
-__AFL_LOOP is a token recognised and expanded by the AFL compiler (so no need
+__AFL_LOOP is a token recognized and expanded by the AFL compiler (so no need
to "#include" a file defining it) that implements the logic for the fuzzing.
Each time through the loop (apart from the first), it raises a SIGSTOP signal
telling AFL that the packet has been processed and instructing it to provide
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// Set up address structures.
setAddress(ipversion);
- // Create the socket throw which packets read from stdin will be send
+ // Create the socket through which packets read from stdin will be sent
// to the port on which Kea is listening. This is closed in the
// destructor.
sockfd_ = socket((ipversion == 4) ? AF_INET : AF_INET6, SOCK_DGRAM, 0);
-// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
///
/// Persistent-mode AFL fuzzing has the AFL fuzzer send packets of data to
/// stdin of the program being tested. The program processes the data and
-/// signals to AFL that it it complete.
+/// signals to AFL that it is complete.
///
/// To reduce the code changes required, the scheme adopted for Kea is that
/// the AFL data read from stdin is written to an address/port on which Kea
/// when trying to send it to the port on which Kea lsutens.
static constexpr size_t MAX_SEND_SIZE = 64000;
- /// @brief Number of many packets Kea will process until shutting down.
+ /// @brief Number of packets Kea will process before shutting down.
///
/// After the shutdown, AFL will restart it. This safety switch is here for
/// eliminating cases where Kea goes into a weird state and stops
-// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
-// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this