]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agovrrpd: stop fuzzing zapi, go back to vrrp old-fuzz
Quentin Young [Mon, 15 Nov 2021 23:42:54 +0000 (18:42 -0500)]
vrrpd: stop fuzzing zapi, go back to vrrp

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agorebase fixups
Quentin Young [Mon, 15 Nov 2021 23:35:34 +0000 (18:35 -0500)]
rebase fixups

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agobgpd: We need to initialize the community alias hash
Donald Sharp [Wed, 28 Jul 2021 17:48:04 +0000 (13:48 -0400)]
bgpd: We need to initialize the community alias hash

When we are starting up under fuzzing we must have the community
alias hash inited on startup.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Ensure stream meets some level of stringency for fuzzing
Donald Sharp [Wed, 4 Aug 2021 14:55:39 +0000 (10:55 -0400)]
zebra: Ensure stream meets some level of stringency for fuzzing

In the fuzzing code we cut to the chase and call zserv_handle_commands
which bypasses the basic parsing correctness done in zserv_read
duplicate some of this code in the zserv_handle_commands function
so we can throw away blatantly bad packages.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Do not leak memory when fuzzing
Donald Sharp [Tue, 3 Aug 2021 19:51:59 +0000 (15:51 -0400)]
ospfd: Do not leak memory when fuzzing

When executing a fuzzing target there exists a code path
where we allocate memory and then drop it immediately
because the fuzzing does not actually schedule threads of
execution.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Switch to zapi fuzzing as higher priority
Donald Sharp [Fri, 6 Aug 2021 18:53:14 +0000 (14:53 -0400)]
lib: Switch to zapi fuzzing as higher priority

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd, zebra: rebase fixups
Quentin Young [Fri, 11 Jun 2021 15:14:52 +0000 (11:14 -0400)]
ospfd, zebra: rebase fixups

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agozebra: fixup fuzzer entrypoint for new flags
Quentin Young [Mon, 26 Apr 2021 21:50:15 +0000 (17:50 -0400)]
zebra: fixup fuzzer entrypoint for new flags

new flags in zebra_router_init()

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agobgpd: fixup fuzzer entrypoint for bgp ext message
Quentin Young [Mon, 26 Apr 2021 21:49:52 +0000 (17:49 -0400)]
bgpd: fixup fuzzer entrypoint for bgp ext message

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoospfd, vrrpd: fuzzing rebase fixes
Quentin Young [Wed, 14 Apr 2021 23:14:04 +0000 (19:14 -0400)]
ospfd, vrrpd: fuzzing rebase fixes

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agobgpd: fixups for fuzzing rebase
Quentin Young [Wed, 14 Apr 2021 23:13:05 +0000 (19:13 -0400)]
bgpd: fixups for fuzzing rebase

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agolib: fixup fuzzing ifdef around memory
Quentin Young [Mon, 2 Nov 2020 18:06:10 +0000 (13:06 -0500)]
lib: fixup fuzzing ifdef around memory

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoospfd: free fuzzing input
Quentin Young [Fri, 11 Sep 2020 00:13:42 +0000 (20:13 -0400)]
ospfd: free fuzzing input

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agolib: dont try to initialize logging dirs
Quentin Young [Fri, 11 Sep 2020 00:13:20 +0000 (20:13 -0400)]
lib: dont try to initialize logging dirs

Not needed for fuzzing and fails

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agosuppress some more expected unsigned wraps
Quentin Young [Tue, 8 Sep 2020 15:07:23 +0000 (11:07 -0400)]
suppress some more expected unsigned wraps

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agolib: explicit cast to unsigned
Quentin Young [Fri, 4 Sep 2020 18:22:34 +0000 (14:22 -0400)]
lib: explicit cast to unsigned

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agolib: disable backtrace in stream warnings
Quentin Young [Wed, 2 Sep 2020 20:59:37 +0000 (16:59 -0400)]
lib: disable backtrace in stream warnings

floods fuzzing logs

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agolib: ignore over/underflow for jhash2
Quentin Young [Wed, 2 Sep 2020 20:53:06 +0000 (16:53 -0400)]
lib: ignore over/underflow for jhash2

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agozebra: refactor netlink fuzzing
Jakub Urbańczyk [Fri, 21 Aug 2020 16:24:40 +0000 (18:24 +0200)]
zebra: refactor netlink fuzzing

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
3 years agofuzzing: rebase
Quentin Young [Mon, 17 Aug 2020 21:40:04 +0000 (17:40 -0400)]
fuzzing: rebase

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agozebra, ospfd, vrrpd: update fuzzin' shims
Quentin Young [Wed, 1 Jul 2020 21:58:38 +0000 (17:58 -0400)]
zebra, ospfd, vrrpd: update fuzzin' shims

some function sigs changed, zebra got some new message types and a
refactor.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: enable evpn & mpls safis for fuzzing
Quentin Young [Wed, 13 May 2020 23:17:21 +0000 (19:17 -0400)]
bgpd: enable evpn & mpls safis for fuzzing

Allow the fuzzer to get into some more exotic safis

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agolib: update fuzz init for zlog rewrite
Quentin Young [Tue, 21 Apr 2020 18:47:52 +0000 (14:47 -0400)]
lib: update fuzz init for zlog rewrite

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agolib, pimd: make implicit type conversions explicit
Quentin Young [Tue, 14 Apr 2020 23:22:43 +0000 (19:22 -0400)]
lib, pimd: make implicit type conversions explicit

In order to find meaningful truncations, overflows and underflows, we
gotta get rid of all the intentional implicit ones

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoospfd: size fuzzing stream exactly to input
Quentin Young [Tue, 14 Apr 2020 04:37:50 +0000 (00:37 -0400)]
ospfd: size fuzzing stream exactly to input

ASAN only sees reads outside of allocated blocks; uninitialized data is
MSAN's domain

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoospfd: fix memleak from fuzzing modifications
Quentin Young [Fri, 20 Mar 2020 21:31:35 +0000 (17:31 -0400)]
ospfd: fix memleak from fuzzing modifications

skipping a flood results in refcnt not being decremented and in the long
run a memleak, unfortunately we gotta do this one

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agolib: disable signal handlers for fuzzing
Quentin Young [Thu, 5 Mar 2020 20:40:26 +0000 (15:40 -0500)]
lib: disable signal handlers for fuzzing

libFuzzer uses signal handlers for process control, overwriting them
makes it difficult to kill libFuzzer-linked programs.

With this patch ^C now works on libFuzzer runs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: remove unnecessary fprintf in fuzzing
Quentin Young [Tue, 3 Mar 2020 16:29:16 +0000 (11:29 -0500)]
bgpd: remove unnecessary fprintf in fuzzing

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: reset fuzzer stream
Quentin Young [Tue, 3 Mar 2020 05:03:50 +0000 (00:03 -0500)]
bgpd: reset fuzzer stream

Not resetting this results in random cov

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agovrrpd: add fuzz target for zapi
Quentin Young [Sun, 1 Mar 2020 22:26:55 +0000 (17:26 -0500)]
vrrpd: add fuzz target for zapi

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agolib: add zapi clientside fuzz entrypoint
Quentin Young [Sun, 1 Mar 2020 00:55:35 +0000 (19:55 -0500)]
lib: add zapi clientside fuzz entrypoint

This can be used by daemon-specific fuzzing targets to feed inputs to
their zclient

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agopimd: fix double free under afl
Quentin Young [Fri, 21 Feb 2020 04:16:58 +0000 (23:16 -0500)]
pimd: fix double free under afl

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agopimd: add libFuzzer support
Quentin Young [Thu, 20 Feb 2020 18:37:22 +0000 (13:37 -0500)]
pimd: add libFuzzer support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agozebra: handle gr weirdness under libFuzzer
Quentin Young [Wed, 19 Feb 2020 21:52:00 +0000 (16:52 -0500)]
zebra: handle gr weirdness under libFuzzer

Two workarounds here. The #ifndef around assert(0) is to get around a
bug, in which a client that connects, announces GR capability,
disconnects, reconnects then sends anything other than a ZAPI hello will
hit the assert. GR resync is done in zread_hello(), so if a reconnecting
client doesn't send a hello then GR will notice that it's received a
disonnect for the same client twice in a row and assert. This is a bug,
GR should be able to handle that.

The rest of the code works around GR having a timer-based memory free.
Since we've disabled all thread.h code to increase determinism and avoid
mutex locks and other weirdness, clients repeatedly announcing GR
capability messages will result in a soft memleak.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoospfd, pimd: add missing var, skip mroute sock
Quentin Young [Tue, 11 Feb 2020 19:48:16 +0000 (14:48 -0500)]
ospfd, pimd: add missing var, skip mroute sock

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agovrrpd: add afl & libfuzzer support
Quentin Young [Wed, 22 Jan 2020 19:58:14 +0000 (14:58 -0500)]
vrrpd: add afl & libfuzzer support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoospfd: add libfuzzer support
Quentin Young [Sun, 19 Jan 2020 01:17:03 +0000 (20:17 -0500)]
ospfd: add libfuzzer support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: clean up some libfuzzer / afl stuff
Quentin Young [Fri, 17 Jan 2020 15:23:24 +0000 (10:23 -0500)]
bgpd: clean up some libfuzzer / afl stuff

- Unify the paths a bit more
- Switch to maintaining the peer and not deleting it after each packet;
  this increased coverage in zebra a lot, might help here
- Free processed packets, in libfuzzer case so we dont leak them
- Add check that size is at least BGP_HEADER_SIZE, validate_header()
  assumes it

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agozebra: try to optimize a bit more
Quentin Young [Wed, 15 Jan 2020 07:19:47 +0000 (02:19 -0500)]
zebra: try to optimize a bit more

try to avoid mutex locks, thread schedules, etc.

3 years agooptimize zebra for fuzzin'
Quentin Young [Wed, 15 Jan 2020 06:36:17 +0000 (01:36 -0500)]
optimize zebra for fuzzin'

- turn off kernel foo; netlink reads are 70% of runtime
- turn off mlag thread

3 years agozebra: add libFuzzer support
Quentin Young [Mon, 13 Jan 2020 20:32:08 +0000 (15:32 -0500)]
zebra: add libFuzzer support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agotweak configure options for --enable-libfuzzer
Quentin Young [Mon, 13 Jan 2020 20:25:02 +0000 (15:25 -0500)]
tweak configure options for --enable-libfuzzer

* Compile (but don't link) with libfuzzer support for all daemons - this
  is -fsanitize=fuzzer-no-link
* Remove forcing ASAN for libfuzzer - better to control which sanitizer
  you want with --enable-<sanitizer>

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: cleanup suboptimal AFL paths after libFuzzer
Quentin Young [Mon, 13 Jan 2020 20:20:01 +0000 (15:20 -0500)]
bgpd: cleanup suboptimal AFL paths after libFuzzer

The AFL path through LLVMFuzzerTestOneInput is running a bit slow
because we are initializing BGP twice. Fix this. Also, since we know at
compile time whether we need to create a peer (libFuzzer) or use one
created already (AFL fork() case) we can save a branch in the hot path,
so let's do that.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: bit of cleanup for libfuzzer conversion
Quentin Young [Mon, 13 Jan 2020 19:06:58 +0000 (14:06 -0500)]
bgpd: bit of cleanup for libfuzzer conversion

3 years agodisable more privilege things
Quentin Young [Mon, 13 Jan 2020 18:37:19 +0000 (13:37 -0500)]
disable more privilege things

3 years agodisable logs for fuzzing
Quentin Young [Sat, 11 Jan 2020 20:17:48 +0000 (15:17 -0500)]
disable logs for fuzzing

3 years agospeed up bgp in-process by not querying kernel for bgp port
Quentin Young [Sat, 11 Jan 2020 20:17:36 +0000 (15:17 -0500)]
speed up bgp in-process by not querying kernel for bgp port

3 years agofix memleak in libfuzzer entrypoint
Quentin Young [Sat, 11 Jan 2020 20:16:21 +0000 (15:16 -0500)]
fix memleak in libfuzzer entrypoint

3 years agoenable libfuzzer for bgpd
Quentin Young [Sat, 11 Jan 2020 03:20:33 +0000 (22:20 -0500)]
enable libfuzzer for bgpd

Wow that was painful

libFuzzer replaces main(), so while we can compile with
-fsanitize=fuzzer, we can't link with it unless we have a way to
undefine main(). So I've added a #define, FUZZING_LIBFUZZER, that
daemons who want to support libfuzzer need to guard their main() with.
This also means we can't use the SAN_FLAGS automake variable, since that
is included in both AM_CFLAGS and AM_LDFLAGS, to add -fsanitize=fuzzer
to. We need new daemon specific flags. Actually, we can add
-fsanitize=fuzzer-no-link to SAN_FLAGS, but we need daemon specific
LDFLAGS so we can control who links with -fsanitize=fuzzer. Aside from
replacing main(), LibFuzzer.a also needs to link to a user-defined
function called `LLVMFuzzerTestOneInput` which is the fuzzer entrypoint.

For bgpd, because libfuzzer is in-process, we now need to actuall clean
up after ourselves each fuzz run to avoid leaking memory.  We also can't
touch global state. This also means we run slower because we have to
create and destroy a peer struct every iteration.

Finally I've almost certainly broken afl for now, will fix later.

3 years agoenable libfuzzer for bgpd
Quentin Young [Sat, 11 Jan 2020 03:20:33 +0000 (22:20 -0500)]
enable libfuzzer for bgpd

Wow that was painful

libFuzzer replaces main(), so while we can compile with
-fsanitize=fuzzer, we can't link with it unless we have a way to
undefine main(). So I've added a #define, FUZZING_LIBFUZZER, that
daemons who want to support libfuzzer need to guard their main() with.
This also means we can't use the SAN_FLAGS automake variable, since that
is included in both AM_CFLAGS and AM_LDFLAGS, to add -fsanitize=fuzzer
to. We need new daemon specific flags. Actually, we can add
-fsanitize=fuzzer-no-link to SAN_FLAGS, but we need daemon specific
LDFLAGS so we can control who links with -fsanitize=fuzzer.

Also, compiling with libfuzzer also requires that you define a function
named LLVMFuzzerTestOneInput(). So I defined a stub version in libfrr.c
and added a macro to undefine it for daemons who actually implement it.
Now that I write it down this probably isn't necessary at all given the
previous paragraph. I think that function is only checked for at link
time.

For bgpd, because libfuzzer is in-process, we now need to actuall clean
up after ourselves each fuzz run to avoid leaking memory.  We also can't
touch global state. This also means we run slower because we have to
create and destroy a peer struct every iteration.

Finally I've almost certainly broken afl for now, will fix later.

3 years agozebra: free fuzzing input
Quentin Young [Mon, 6 Jan 2020 17:08:50 +0000 (12:08 -0500)]
zebra: free fuzzing input

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: return early if no fuzz input
Quentin Young [Mon, 6 Jan 2020 06:10:14 +0000 (01:10 -0500)]
bgpd: return early if no fuzz input

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agozebra: free fuzzing stream
Quentin Young [Mon, 6 Jan 2020 04:14:14 +0000 (23:14 -0500)]
zebra: free fuzzing stream

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agozebra: add fuzzing shim
Quentin Young [Fri, 3 Jan 2020 05:32:37 +0000 (00:32 -0500)]
zebra: add fuzzing shim

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoospfd: enable deferred fork server mode
Quentin Young [Fri, 3 Jan 2020 04:02:54 +0000 (23:02 -0500)]
ospfd: enable deferred fork server mode

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agopimd: enable deferred forkserver mode
Quentin Young [Fri, 3 Jan 2020 00:48:15 +0000 (19:48 -0500)]
pimd: enable deferred forkserver mode

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: enable deferred forkserver mode
Quentin Young [Thu, 2 Jan 2020 07:02:31 +0000 (02:02 -0500)]
bgpd: enable deferred forkserver mode

Having narrowed down the issue with deferred mode to capability privs,
and having disabled those, we can now use afl deferred mode for...10x
performance gainz?!?!? zomg!

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agolib: improve frr_init_fast() speeeed
Quentin Young [Thu, 2 Jan 2020 07:01:57 +0000 (02:01 -0500)]
lib: improve frr_init_fast() speeeed

Aggressively disable some more things.

This also disables privilege dropping, because it breaks AFL deferred
mode. After this patch we can run about 10-20x faster with deferred
mode!

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agopimd: add ability to fuzz igmp & mroute messages
Quentin Young [Sun, 22 Dec 2019 00:48:54 +0000 (19:48 -0500)]
pimd: add ability to fuzz igmp & mroute messages

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoospfd: mock interface mtu = 68
Quentin Young [Thu, 12 Dec 2019 20:43:29 +0000 (15:43 -0500)]
ospfd: mock interface mtu = 68

zero mtu causes spurious crashes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoospfd allow fuzzing LSUPD, LSACK, LSREQ packets
Quentin Young [Thu, 12 Dec 2019 19:53:06 +0000 (14:53 -0500)]
ospfd allow fuzzing LSUPD, LSACK, LSREQ packets

- Anything except HELLO wants a neighbor created, so do that
- Skip some unnecessary stuff
- Most stuff checks the LSDB and returns early, so skip those

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agolib: disable thread scheduler funcs
Quentin Young [Thu, 12 Dec 2019 19:52:20 +0000 (14:52 -0500)]
lib: disable thread scheduler funcs

dont work when we skip threadmaster creation / init

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoforce ospf checksum success
Quentin Young [Thu, 12 Dec 2019 01:14:47 +0000 (20:14 -0500)]
force ospf checksum success

3 years agoospfd: add fuzzing shunt
Quentin Young [Tue, 10 Dec 2019 21:11:28 +0000 (16:11 -0500)]
ospfd: add fuzzing shunt

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: use fuzzing stuff in libfrr
Quentin Young [Wed, 11 Dec 2019 21:37:52 +0000 (16:37 -0500)]
bgpd: use fuzzing stuff in libfrr

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agolib: add fuzzing stuff in libfrr
Quentin Young [Wed, 11 Dec 2019 21:37:38 +0000 (16:37 -0500)]
lib: add fuzzing stuff in libfrr

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agodisable dynamic capability message parsing in fuzz
Quentin Young [Tue, 3 Dec 2019 18:39:27 +0000 (13:39 -0500)]
disable dynamic capability message parsing in fuzz

It doesn't work and the code is so old it won't work with any vendor,
so I don't want to fix it. Skip this path for now.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoSET ALL THE FLAGS WHEEEEEEE
Quentin Young [Sun, 24 Nov 2019 07:01:05 +0000 (02:01 -0500)]
SET ALL THE FLAGS WHEEEEEEE

WEEHHHHHHHH CAPABILITIES

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd: add checks performed by i/o code
Quentin Young [Thu, 21 Nov 2019 04:35:44 +0000 (23:35 -0500)]
bgpd: add checks performed by i/o code

Getting some false positives from AFL because we aren't performing
checks that are performed by the I/O thread before the packet processor
is ever invoked. Add those checks.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd ultra fast wagyu mode
Quentin Young [Thu, 21 Nov 2019 00:37:46 +0000 (19:37 -0500)]
bgpd ultra fast wagyu mode

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agobgpd fuzzing
Quentin Young [Wed, 20 Nov 2019 23:21:20 +0000 (18:21 -0500)]
bgpd fuzzing

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agocut down vrf stuff
Quentin Young [Tue, 19 Nov 2019 22:33:06 +0000 (17:33 -0500)]
cut down vrf stuff

3 years agostrip down frr_init
Quentin Young [Tue, 19 Nov 2019 22:23:41 +0000 (17:23 -0500)]
strip down frr_init

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoadd a neighbor for join fuzzing
Quentin Young [Tue, 19 Nov 2019 21:48:03 +0000 (16:48 -0500)]
add a neighbor for join fuzzing

3 years agomore libdislocate & cli disabling
Quentin Young [Tue, 19 Nov 2019 16:49:55 +0000 (11:49 -0500)]
more libdislocate & cli disabling

3 years agodisable malloc extensions for libdislocate
Quentin Young [Tue, 19 Nov 2019 03:56:53 +0000 (22:56 -0500)]
disable malloc extensions for libdislocate

libdislocate allows asan-like functionality but works ootb with AFL.
Unfortunately linux malloc extensions don't like it, so disable those.

3 years agodisable cli commands & checksums
Quentin Young [Mon, 18 Nov 2019 21:12:19 +0000 (16:12 -0500)]
disable cli commands & checksums

3 years agoafl llvm deferred mode
Quentin Young [Mon, 18 Nov 2019 20:17:46 +0000 (15:17 -0500)]
afl llvm deferred mode

3 years agopimd: add fuzzing shunt
Quentin Young [Mon, 18 Nov 2019 05:40:41 +0000 (00:40 -0500)]
pimd: add fuzzing shunt

Add ability to read a raw pim packet from stdin and parse it. Useful for
fuzzing pim packet parsing.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agopimd: fix rp info lookup failure
Quentin Young [Mon, 6 Apr 2020 05:32:34 +0000 (01:32 -0400)]
pimd: fix rp info lookup failure

rp info lookup can return null, avoid this so we can continue fuzzing

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agopim: random fuzzing fixes
Quentin Young [Fri, 21 Feb 2020 04:20:27 +0000 (23:20 -0500)]
pim: random fuzzing fixes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
3 years agoMerge pull request #10014 from rgirada/ospf_nbr_cov
Donatas Abraitis [Mon, 15 Nov 2021 15:55:35 +0000 (17:55 +0200)]
Merge pull request #10014 from rgirada/ospf_nbr_cov

ospfd: fixing few coverity issues in ospf_vty.c

3 years agoMerge pull request #10048 from qlyoung/fix-reload-doc-comments
Donatas Abraitis [Mon, 15 Nov 2021 15:54:18 +0000 (17:54 +0200)]
Merge pull request #10048 from qlyoung/fix-reload-doc-comments

Fix reload comments

3 years agoMerge pull request #10050 from mjstapp/fix_mpls_queue_cleanup
Donatas Abraitis [Mon, 15 Nov 2021 15:51:51 +0000 (17:51 +0200)]
Merge pull request #10050 from mjstapp/fix_mpls_queue_cleanup

zebra: free LSP workqueue later during shutdown

3 years agoMerge pull request #10047 from idryzhov/fix-bfd-update-source
Donatas Abraitis [Mon, 15 Nov 2021 15:28:14 +0000 (17:28 +0200)]
Merge pull request #10047 from idryzhov/fix-bfd-update-source

bgpd: fix source-address for BFD sessions when using update-source IFNAME

3 years agoMerge pull request #10046 from donaldsharp/bgp_instance_del
David Lamparter [Mon, 15 Nov 2021 09:49:31 +0000 (10:49 +0100)]
Merge pull request #10046 from donaldsharp/bgp_instance_del

3 years agoMerge pull request #9956 from idryzhov/bfd-remove-ttl
Russ White [Sun, 14 Nov 2021 17:24:28 +0000 (12:24 -0500)]
Merge pull request #9956 from idryzhov/bfd-remove-ttl

lib: remove confusing bfd TTL API

3 years agoMerge pull request #10049 from qlyoung/doc-update-process-arch
Donatas Abraitis [Sat, 13 Nov 2021 19:45:40 +0000 (21:45 +0200)]
Merge pull request #10049 from qlyoung/doc-update-process-arch

doc: update & clarify language in process arch doc

3 years agoMerge pull request #10032 from opensourcerouting/build-fix-20211111
Donald Sharp [Sat, 13 Nov 2021 15:10:59 +0000 (10:10 -0500)]
Merge pull request #10032 from opensourcerouting/build-fix-20211111

build: assorted build system improvements, 2021-11 edition

3 years agoMerge pull request #10036 from donaldsharp/finally_frr
Jafar Al-Gharaibeh [Sat, 13 Nov 2021 03:35:27 +0000 (21:35 -0600)]
Merge pull request #10036 from donaldsharp/finally_frr

Finally frr

3 years agozebra: free LSP workqueue later during shutdown
Mark Stapp [Fri, 12 Nov 2021 20:10:00 +0000 (15:10 -0500)]
zebra: free LSP workqueue later during shutdown

Free the LSP workqueue later during shutdown, so that zebra
has enough time to clean up and uninstall any LSPs.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
3 years agodoc: update & clarify language in process arch doc
Quentin Young [Fri, 12 Nov 2021 19:45:36 +0000 (14:45 -0500)]
doc: update & clarify language in process arch doc

There was a historical blurb at the top of the process architecture
document that in several instances caused some confusion regarding
whether or not FRR supports multithreading. Remove this paragraph and
replace it with a summary of the page contents.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agotools: simplify excessively complex conditional
Quentin Young [Fri, 12 Nov 2021 18:37:09 +0000 (13:37 -0500)]
tools: simplify excessively complex conditional

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agotests: Ensure BGP has had time to import routes through the vpn
Donald Sharp [Fri, 12 Nov 2021 15:52:03 +0000 (10:52 -0500)]
tests: Ensure BGP has had time to import routes through the vpn

Currently I get bgp_instance_del-test as well as bgp_l3vpn_to_bgp_vrf
failures every ~3-4 runs when under a 40 parallel run with micronet.
Examination of the failure and passing cases always leads to the
failures showing convergence of bgp bestpath immediately after
the show commands to ensure that the routes are there.

Modify the code to look for the fact that the vrf has
converged from routes being passed around across vrf's
and ensure that bestpath has run on them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Add vrf information to best path debugging
Donald Sharp [Fri, 12 Nov 2021 15:46:48 +0000 (10:46 -0500)]
bgpd: Add vrf information to best path debugging

When debugging issues for routes in multiple vrf's.  It would
be extremely useful if the debug output had which vrf we
are acting on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotools: string literals -> comments
Quentin Young [Fri, 12 Nov 2021 18:16:25 +0000 (13:16 -0500)]
tools: string literals -> comments

Convert all floating string literals being used as comments, to comments

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #10045 from qlyoung/fix-pr-10006
Igor Ryzhov [Fri, 12 Nov 2021 18:12:58 +0000 (21:12 +0300)]
Merge pull request #10045 from qlyoung/fix-pr-10006

zebra: use tabs instead of spaces zebra_vxlan.c

3 years agobgpd: fix source-address for BFD sessions when using update-source IFNAME
Igor Ryzhov [Fri, 12 Nov 2021 16:32:06 +0000 (19:32 +0300)]
bgpd: fix source-address for BFD sessions when using update-source IFNAME

When "update-source IFNAME" is used for the neighbor, p->update_source
is set to NULL, so we can't use it as a source address and should use
the address from p->su_local.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agozebra: use tabs instead of spaces zebra_vxlan.c
Quentin Young [Fri, 12 Nov 2021 16:09:48 +0000 (11:09 -0500)]
zebra: use tabs instead of spaces zebra_vxlan.c

Bad style introduced in
https://github.com/FRRouting/frr/pull/10006

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #9945 from idryzhov/isis-time-t
Donatas Abraitis [Fri, 12 Nov 2021 06:39:46 +0000 (08:39 +0200)]
Merge pull request #9945 from idryzhov/isis-time-t

isisd: use time_t for last update and last flap