From 3e180a2516be95f07462348121639bd4d132d305 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 4 Nov 2018 21:43:08 +0100 Subject: util: initialize _argtypes in VA_FORMAT_ADVANCE when systemd is built with MSan This gets around https://github.com/google/sanitizers/issues/992. --- src/basic/stdio-util.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h index 73c03274c7..dc67b6e761 100644 --- a/src/basic/stdio-util.h +++ b/src/basic/stdio-util.h @@ -7,6 +7,7 @@ #include #include "macro.h" +#include "util.h" #define snprintf_ok(buf, len, fmt, ...) \ ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) @@ -18,6 +19,9 @@ do { \ int _argtypes[128]; \ size_t _i, _k; \ + /* See https://github.com/google/sanitizers/issues/992 */ \ + if (HAS_FEATURE_MEMORY_SANITIZER) \ + zero(_argtypes); \ _k = parse_printf_format((format), ELEMENTSOF(_argtypes), _argtypes); \ assert(_k < ELEMENTSOF(_argtypes)); \ for (_i = 0; _i < _k; _i++) { \ -- cgit v1.2.3 From 0621f03b133ef90b8df28046cae7dcbdc2a97eba Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 4 Nov 2018 21:49:09 +0100 Subject: networkd: remove a weird assertion from network_load_one The assertion was added in dbffab87f1504abc9f but I'm not exactly sure why. Now it just crashes a fuzzer I wrote. I, of course, could fix the fuzzer so that it would generate names ending in ".network" if anyone would tell me why the assertion should be kept here. --- src/network/networkd-network.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 1890021f51..d6d59bab43 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -181,8 +181,6 @@ static int network_load_one(Manager *manager, const char *filename) { if (!d) return -EINVAL; - assert(streq(d, ".network")); - *d = '\0'; network->required_for_online = true; -- cgit v1.2.3 From e27aac11f26e6e42d14939e9348b2723f2d532ac Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 4 Nov 2018 22:06:03 +0100 Subject: networkd: make netdev_load_one "public" and add a fuzzer for it --- src/network/fuzz-netdev-parser.c | 22 ++++++++++++++++++++++ src/network/meson.build | 10 ++++++++++ src/network/netdev/netdev.c | 2 +- src/network/netdev/netdev.h | 1 + test/fuzz/fuzz-netdev-parser/11-dummy.netdev | 3 +++ test/fuzz/fuzz-netdev-parser/12-dummy.netdev | 3 +++ test/fuzz/fuzz-netdev-parser/21-macvlan.netdev | 3 +++ test/fuzz/fuzz-netdev-parser/21-macvtap.netdev | 3 +++ test/fuzz/fuzz-netdev-parser/21-vlan.netdev | 10 ++++++++++ .../25-bond-active-backup-slave.netdev | 6 ++++++ test/fuzz/fuzz-netdev-parser/25-bond.netdev | 18 ++++++++++++++++++ test/fuzz/fuzz-netdev-parser/25-bridge.netdev | 13 +++++++++++++ test/fuzz/fuzz-netdev-parser/25-geneve.netdev | 12 ++++++++++++ test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev | 7 +++++++ .../fuzz-netdev-parser/25-gretap-tunnel.netdev | 7 +++++++ .../fuzz-netdev-parser/25-ip6gre-tunnel.netdev | 7 +++++++ .../fuzz-netdev-parser/25-ip6tnl-tunnel.netdev | 8 ++++++++ .../25-ipip-tunnel-independent.netdev | 9 +++++++++ test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev | 8 ++++++++ test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev | 6 ++++++ test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev | 7 +++++++ test/fuzz/fuzz-netdev-parser/25-tap.netdev | 7 +++++++ test/fuzz/fuzz-netdev-parser/25-tun.netdev | 7 +++++++ test/fuzz/fuzz-netdev-parser/25-vcan.netdev | 3 +++ test/fuzz/fuzz-netdev-parser/25-veth.netdev | 8 ++++++++ test/fuzz/fuzz-netdev-parser/25-vrf.netdev | 6 ++++++ test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev | 7 +++++++ test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev | 7 +++++++ test/fuzz/fuzz-netdev-parser/25-vxlan.netdev | 16 ++++++++++++++++ test/fuzz/fuzz-netdev-parser/25-wireguard.netdev | 12 ++++++++++++ test/fuzz/fuzz-netdev-parser/26-bridge.netdev | 3 +++ test/fuzz/fuzz-netdev-parser/github-10615 | 5 +++++ 32 files changed, 245 insertions(+), 1 deletion(-) create mode 100644 src/network/fuzz-netdev-parser.c create mode 100644 test/fuzz/fuzz-netdev-parser/11-dummy.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/12-dummy.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/21-macvlan.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/21-macvtap.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/21-vlan.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-bond-active-backup-slave.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-bond.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-bridge.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-geneve.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-gretap-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-ip6gre-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-ip6tnl-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-ipip-tunnel-independent.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-tap.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-tun.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-vcan.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-veth.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-vrf.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-vxlan.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/25-wireguard.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/26-bridge.netdev create mode 100644 test/fuzz/fuzz-netdev-parser/github-10615 diff --git a/src/network/fuzz-netdev-parser.c b/src/network/fuzz-netdev-parser.c new file mode 100644 index 0000000000..adc85549e5 --- /dev/null +++ b/src/network/fuzz-netdev-parser.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ + +#include "fd-util.h" +#include "fileio.h" +#include "fs-util.h" +#include "fuzz.h" +#include "networkd-manager.h" + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + _cleanup_(manager_freep) Manager *manager = NULL; + _cleanup_fclose_ FILE *f = NULL; + _cleanup_(unlink_tempfilep) char netdev_config[] = "/tmp/fuzz-networkd.XXXXXX"; + + assert_se(fmkostemp_safe(netdev_config, "r+", &f) == 0); + if (size != 0) + assert_se(fwrite(data, size, 1, f) == 1); + + rewind(f); + assert_se(manager_new(&manager) >= 0); + (void) netdev_load_one(manager, netdev_config); + return 0; +} diff --git a/src/network/meson.build b/src/network/meson.build index 175d2f822c..db03e2234f 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -136,6 +136,16 @@ if conf.get('ENABLE_NETWORKD') == 1 install_data('networkd.conf', install_dir : pkgsysconfdir) + fuzzers += [ + [['src/network/fuzz-netdev-parser.c', + 'src/fuzz/fuzz.h'], + [libnetworkd_core, + libudev_static, + libsystemd_network, + libshared], + [threads]], + ] + tests += [ [['src/network/test-networkd-conf.c'], [libnetworkd_core, diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c index 52b40dd68e..9ec16579e4 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -594,7 +594,7 @@ int netdev_join(NetDev *netdev, Link *link, sd_netlink_message_handler_t callbac return 0; } -static int netdev_load_one(Manager *manager, const char *filename) { +int netdev_load_one(Manager *manager, const char *filename) { _cleanup_(netdev_unrefp) NetDev *netdev_raw = NULL, *netdev = NULL; _cleanup_fclose_ FILE *file = NULL; const char *dropin_dirname; diff --git a/src/network/netdev/netdev.h b/src/network/netdev/netdev.h index 8c884bb124..a1557bec41 100644 --- a/src/network/netdev/netdev.h +++ b/src/network/netdev/netdev.h @@ -146,6 +146,7 @@ extern const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX]; #define NETDEV(n) (&(n)->meta) int netdev_load(Manager *manager); +int netdev_load_one(Manager *manager, const char *filename); void netdev_drop(NetDev *netdev); NetDev *netdev_unref(NetDev *netdev); diff --git a/test/fuzz/fuzz-netdev-parser/11-dummy.netdev b/test/fuzz/fuzz-netdev-parser/11-dummy.netdev new file mode 100644 index 0000000000..6797eb4b09 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/11-dummy.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=test1 +Kind=dummy diff --git a/test/fuzz/fuzz-netdev-parser/12-dummy.netdev b/test/fuzz/fuzz-netdev-parser/12-dummy.netdev new file mode 100644 index 0000000000..a7fdc0f7e0 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/12-dummy.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=dummy98 +Kind=dummy diff --git a/test/fuzz/fuzz-netdev-parser/21-macvlan.netdev b/test/fuzz/fuzz-netdev-parser/21-macvlan.netdev new file mode 100644 index 0000000000..e9a3c5b347 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/21-macvlan.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=macvlan99 +Kind=macvlan diff --git a/test/fuzz/fuzz-netdev-parser/21-macvtap.netdev b/test/fuzz/fuzz-netdev-parser/21-macvtap.netdev new file mode 100644 index 0000000000..2c23aacfb2 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/21-macvtap.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=macvtap99 +Kind=macvtap diff --git a/test/fuzz/fuzz-netdev-parser/21-vlan.netdev b/test/fuzz/fuzz-netdev-parser/21-vlan.netdev new file mode 100644 index 0000000000..fe9801c8a2 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/21-vlan.netdev @@ -0,0 +1,10 @@ +[NetDev] +Name=vlan99 +Kind=vlan + +[VLAN] +Id=99 +GVRP=true +MVRP=true +LooseBinding=true +ReorderHeader=true diff --git a/test/fuzz/fuzz-netdev-parser/25-bond-active-backup-slave.netdev b/test/fuzz/fuzz-netdev-parser/25-bond-active-backup-slave.netdev new file mode 100644 index 0000000000..1bbbf75570 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-bond-active-backup-slave.netdev @@ -0,0 +1,6 @@ +[NetDev] +Name=bond199 +Kind=bond + +[Bond] +Mode=active-backup diff --git a/test/fuzz/fuzz-netdev-parser/25-bond.netdev b/test/fuzz/fuzz-netdev-parser/25-bond.netdev new file mode 100644 index 0000000000..61c54c4de0 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-bond.netdev @@ -0,0 +1,18 @@ +[NetDev] +Name=bond99 +Kind=bond + +[Bond] +Mode=802.3ad +TransmitHashPolicy=layer3+4 +MIIMonitorSec=1s +LACPTransmitRate=fast +UpDelaySec=2s +DownDelaySec=2s +ResendIGMP=4 +MinLinks=1 +AdActorSysPrio=1218 +AdUserPortKey=811 +AdActorSystem=00:11:22:33:44:55 +# feed the sanitizer +AdActorSystem=00:11:22:33:44:55 diff --git a/test/fuzz/fuzz-netdev-parser/25-bridge.netdev b/test/fuzz/fuzz-netdev-parser/25-bridge.netdev new file mode 100644 index 0000000000..e23abd5368 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-bridge.netdev @@ -0,0 +1,13 @@ +[NetDev] +Name=bridge99 +Kind=bridge + +[Bridge] +HelloTimeSec=9 +MaxAgeSec=9 +ForwardDelaySec=9 +AgeingTimeSec=9 +Priority=9 +MulticastQuerier= true +MulticastSnooping=true +STP=true diff --git a/test/fuzz/fuzz-netdev-parser/25-geneve.netdev b/test/fuzz/fuzz-netdev-parser/25-geneve.netdev new file mode 100644 index 0000000000..279d71324e --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-geneve.netdev @@ -0,0 +1,12 @@ +[NetDev] +Name=geneve99 +Kind=geneve + +[GENEVE] +Id=99 +Remote=192.168.22.1 +TTL=1 +UDPChecksum=true +UDP6ZeroChecksumTx=true +UDP6ZeroChecksumRx=true +DestinationPort=6082 diff --git a/test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev new file mode 100644 index 0000000000..94d9320cdb --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=gretun99 +Kind=gre + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-gretap-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-gretap-tunnel.netdev new file mode 100644 index 0000000000..769e7653e4 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-gretap-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=gretap99 +Kind=gretap + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-ip6gre-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-ip6gre-tunnel.netdev new file mode 100644 index 0000000000..b16e0b4969 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-ip6gre-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=ip6gretap99 +Kind=ip6gretap + +[Tunnel] +Local=2a00:ffde:4567:edde::4987 +Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/25-ip6tnl-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-ip6tnl-tunnel.netdev new file mode 100644 index 0000000000..713e685ea1 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-ip6tnl-tunnel.netdev @@ -0,0 +1,8 @@ +[NetDev] +Name=ip6tnl99 +Kind=ip6tnl + +[Tunnel] +Mode=ip6ip6 +Local=2a00:ffde:4567:edde::4987 +Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel-independent.netdev b/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel-independent.netdev new file mode 100644 index 0000000000..36ff8d9429 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel-independent.netdev @@ -0,0 +1,9 @@ +[NetDev] +Name=ipiptun99 +Kind=ipip +MTUBytes=1480 + +[Tunnel] +Local=192.168.223.238 +Remote=192.169.224.239 +Independent=true diff --git a/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev new file mode 100644 index 0000000000..159ac72703 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev @@ -0,0 +1,8 @@ +[NetDev] +Name=ipiptun99 +Kind=ipip +MTUBytes=1480 + +[Tunnel] +Local=192.168.223.238 +Remote=192.169.224.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev b/test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev new file mode 100644 index 0000000000..9921b787a1 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev @@ -0,0 +1,6 @@ +[NetDev] +Name=ipvlan99 +Kind=ipvlan + +[IPVLAN] +Mode=L2 diff --git a/test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev new file mode 100644 index 0000000000..406d74bcf0 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=sittun99 +Kind=sit + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-tap.netdev b/test/fuzz/fuzz-netdev-parser/25-tap.netdev new file mode 100644 index 0000000000..bf5e7fe52c --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-tap.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=tap99 +Kind=tap + +[Tap] +MultiQueue=true +PacketInfo=true diff --git a/test/fuzz/fuzz-netdev-parser/25-tun.netdev b/test/fuzz/fuzz-netdev-parser/25-tun.netdev new file mode 100644 index 0000000000..380ab21552 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-tun.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=tun99 +Kind=tun + +[Tun] +MultiQueue=true +PacketInfo=true diff --git a/test/fuzz/fuzz-netdev-parser/25-vcan.netdev b/test/fuzz/fuzz-netdev-parser/25-vcan.netdev new file mode 100644 index 0000000000..ff1979536a --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-vcan.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=vcan99 +Kind=vcan diff --git a/test/fuzz/fuzz-netdev-parser/25-veth.netdev b/test/fuzz/fuzz-netdev-parser/25-veth.netdev new file mode 100644 index 0000000000..9ae4ad53b8 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-veth.netdev @@ -0,0 +1,8 @@ +[NetDev] +Name=veth99 +Kind=veth +MACAddress=12:34:56:78:9a:bc + +[Peer] +Name=veth-peer +MACAddress=12:34:56:78:9a:bd diff --git a/test/fuzz/fuzz-netdev-parser/25-vrf.netdev b/test/fuzz/fuzz-netdev-parser/25-vrf.netdev new file mode 100644 index 0000000000..bf949ec293 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-vrf.netdev @@ -0,0 +1,6 @@ +[NetDev] +Name=vrf99 +Kind=vrf + +[VRF] +TableId=42 diff --git a/test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev new file mode 100644 index 0000000000..cec6259781 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=vtitun99 +Kind=vti + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev new file mode 100644 index 0000000000..d150c9ce86 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=vti6tun99 +Kind=vti6 + +[Tunnel] +Local=2a00:ffde:4567:edde::4987 +Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/25-vxlan.netdev b/test/fuzz/fuzz-netdev-parser/25-vxlan.netdev new file mode 100644 index 0000000000..819a58356f --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-vxlan.netdev @@ -0,0 +1,16 @@ +[NetDev] +Name=vxlan99 +Kind=vxlan + +[VXLAN] +Id=999 +L2MissNotification=true +L3MissNotification=true +RouteShortCircuit=true +UDPChecksum=true +UDP6ZeroChecksumTx=true +UDP6ZeroChecksumRx=true +RemoteChecksumTx=true +RemoteChecksumRx=true +GroupPolicyExtension=true +DestinationPort=5555 diff --git a/test/fuzz/fuzz-netdev-parser/25-wireguard.netdev b/test/fuzz/fuzz-netdev-parser/25-wireguard.netdev new file mode 100644 index 0000000000..e07d685129 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/25-wireguard.netdev @@ -0,0 +1,12 @@ +[NetDev] +Name=wg99 +Kind=wireguard + +[WireGuard] +PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong= +ListenPort=51820 + +[WireGuardPeer] +PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA= +AllowedIPs=fd31:bf08:57cb::/48,192.168.26.0/24 +Endpoint=wireguard.example.com:51820 diff --git a/test/fuzz/fuzz-netdev-parser/26-bridge.netdev b/test/fuzz/fuzz-netdev-parser/26-bridge.netdev new file mode 100644 index 0000000000..9b31e06b5b --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/26-bridge.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=bridge99 +Kind=bridge diff --git a/test/fuzz/fuzz-netdev-parser/github-10615 b/test/fuzz/fuzz-netdev-parser/github-10615 new file mode 100644 index 0000000000..1151ebfb47 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/github-10615 @@ -0,0 +1,5 @@ +[NetDev] +Name=veth99 +Kind=veth +MACAddress=12:34:56:78:9a:bc +MACAddress=12:34:56:78:9a:bc -- cgit v1.2.3 From 212bd73c788c464c2e19596a102feed848cb78fa Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 4 Nov 2018 22:27:07 +0100 Subject: networkd: make network_load_one "public" and add a fuzzer for it --- src/network/fuzz-network-parser.c | 22 ++++++++++++++++++++++ src/network/meson.build | 8 ++++++++ src/network/networkd-network.c | 2 +- src/network/networkd-network.h | 1 + 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/network/fuzz-network-parser.c diff --git a/src/network/fuzz-network-parser.c b/src/network/fuzz-network-parser.c new file mode 100644 index 0000000000..bfeb46cff3 --- /dev/null +++ b/src/network/fuzz-network-parser.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ + +#include "fd-util.h" +#include "fileio.h" +#include "fs-util.h" +#include "fuzz.h" +#include "networkd-manager.h" + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + _cleanup_(manager_freep) Manager *manager = NULL; + _cleanup_fclose_ FILE *f = NULL; + _cleanup_(unlink_tempfilep) char network_config[] = "/tmp/fuzz-networkd.XXXXXX"; + + assert_se(fmkostemp_safe(network_config, "r+", &f) == 0); + if (size != 0) + assert_se(fwrite(data, size, 1, f) == 1); + + rewind(f); + assert_se(manager_new(&manager) >= 0); + (void) network_load_one(manager, network_config); + return 0; +} diff --git a/src/network/meson.build b/src/network/meson.build index db03e2234f..d4fa27a288 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -144,6 +144,14 @@ if conf.get('ENABLE_NETWORKD') == 1 libsystemd_network, libshared], [threads]], + + [['src/network/fuzz-network-parser.c', + 'src/fuzz/fuzz.h'], + [libnetworkd_core, + libudev_static, + libsystemd_network, + libshared], + [threads]] ] tests += [ diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index d6d59bab43..f257ac6698 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -102,7 +102,7 @@ void network_apply_anonymize_if_set(Network *network) { network->dhcp_use_timezone = false; } -static int network_load_one(Manager *manager, const char *filename) { +int network_load_one(Manager *manager, const char *filename) { _cleanup_(network_freep) Network *network = NULL; _cleanup_fclose_ FILE *file = NULL; char *d; diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h index 495fac83d3..919a2c4b3c 100644 --- a/src/network/networkd-network.h +++ b/src/network/networkd-network.h @@ -272,6 +272,7 @@ void network_free(Network *network); DEFINE_TRIVIAL_CLEANUP_FUNC(Network*, network_free); int network_load(Manager *manager); +int network_load_one(Manager *manager, const char *filename); int network_get_by_name(Manager *manager, const char *name, Network **ret); int network_get(Manager *manager, sd_device *device, const char *ifname, const struct ether_addr *mac, Network **ret); -- cgit v1.2.3 From a633d5b99759c5f0ae711fce576729932d42f5e6 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 4 Nov 2018 23:01:46 +0100 Subject: tests: add a reproducer for https://github.com/systemd/systemd/issues/10629 --- test/fuzz/fuzz-netdev-parser/github-10629 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/fuzz/fuzz-netdev-parser/github-10629 diff --git a/test/fuzz/fuzz-netdev-parser/github-10629 b/test/fuzz/fuzz-netdev-parser/github-10629 new file mode 100644 index 0000000000..e269e3b285 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/github-10629 @@ -0,0 +1,10 @@ +[NetDev] +Name=vlan99 +Kind=vcan + +[VLAN] +Id=99 +GVRP=true +MVRP=true +LooseBinding=true +ReorderHeader=true -- cgit v1.2.3 From efc1a59af66ce428b46cbcff52621a10b193285e Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Sun, 4 Nov 2018 23:04:43 +0100 Subject: tests: add some data that can be fed to fuzz-network-parser --- test/fuzz/fuzz-network-parser/21-vlan.network | 5 +++++ test/fuzz/fuzz-network-parser/23-active-slave.network | 6 ++++++ test/fuzz/fuzz-network-parser/23-bond199.network | 2 ++ test/fuzz/fuzz-network-parser/23-emit-lldp.network | 5 +++++ test/fuzz/fuzz-network-parser/23-primary-slave.network | 6 ++++++ test/fuzz/fuzz-network-parser/23-test1-bond199.network | 6 ++++++ test/fuzz/fuzz-network-parser/24-lldp.network | 5 +++++ test/fuzz/fuzz-network-parser/24-search-domain.network | 7 +++++++ .../fuzz-network-parser/25-address-link-section.network | 5 +++++ .../25-address-section-miscellaneous.network | 10 ++++++++++ test/fuzz/fuzz-network-parser/25-address-section.network | 11 +++++++++++ .../25-ipv6-address-label-section.network | 6 ++++++ .../25-link-section-unmanaged.network | 6 ++++++ test/fuzz/fuzz-network-parser/25-route-section.network | 8 ++++++++ .../25-route-tcp-window-settings.network | 10 ++++++++++ test/fuzz/fuzz-network-parser/25-route-type.network | 14 ++++++++++++++ test/fuzz/fuzz-network-parser/25-sysctl.network | 10 ++++++++++ .../26-bridge-slave-interface-1.network | 11 +++++++++++ .../26-bridge-slave-interface-2.network | 5 +++++ test/fuzz/fuzz-network-parser/bridge99.network | 6 ++++++ .../configure-without-carrier.network | 7 +++++++ .../fuzz-network-parser/dhcp-client-anonymize.network | 16 ++++++++++++++++ .../dhcp-client-critical-connection.network | 9 +++++++++ .../dhcp-client-ipv4-dhcp-settings.network | 15 +++++++++++++++ .../dhcp-client-ipv4-only-ipv6-disabled.network | 6 ++++++ .../fuzz-network-parser/dhcp-client-ipv4-only.network | 5 +++++ .../fuzz-network-parser/dhcp-client-ipv6-only.network | 5 +++++ .../dhcp-client-ipv6-rapid-commit.network | 8 ++++++++ .../fuzz-network-parser/dhcp-client-listen-port.network | 8 ++++++++ .../fuzz-network-parser/dhcp-client-route-metric.network | 10 ++++++++++ .../fuzz-network-parser/dhcp-client-route-table.network | 10 ++++++++++ .../dhcp-client-timezone-router.network | 8 ++++++++ test/fuzz/fuzz-network-parser/dhcp-client.network | 5 +++++ .../dhcp-server-timezone-router.network | 13 +++++++++++++ .../fuzz-network-parser/dhcp-server-veth-peer.network | 6 ++++++ test/fuzz/fuzz-network-parser/dhcp-server.network | 12 ++++++++++++ .../fuzz-network-parser/dhcp-v4-server-veth-peer.network | 6 ++++++ test/fuzz/fuzz-network-parser/gretap.network | 5 +++++ test/fuzz/fuzz-network-parser/gretun.network | 5 +++++ test/fuzz/fuzz-network-parser/ip6gretap.network | 5 +++++ test/fuzz/fuzz-network-parser/ip6tnl.network | 5 +++++ test/fuzz/fuzz-network-parser/ipip.network | 5 +++++ test/fuzz/fuzz-network-parser/ipv6-prefix-veth.network | 5 +++++ test/fuzz/fuzz-network-parser/ipv6-prefix.network | 10 ++++++++++ test/fuzz/fuzz-network-parser/ipvlan.network | 5 +++++ test/fuzz/fuzz-network-parser/macvlan.network | 5 +++++ test/fuzz/fuzz-network-parser/macvtap.network | 5 +++++ .../fuzz/fuzz-network-parser/routing-policy-rule.network | 10 ++++++++++ test/fuzz/fuzz-network-parser/sit.network | 5 +++++ test/fuzz/fuzz-network-parser/test-static.network | 6 ++++++ test/fuzz/fuzz-network-parser/vti.network | 5 +++++ test/fuzz/fuzz-network-parser/vti6.network | 5 +++++ test/fuzz/fuzz-network-parser/vxlan.network | 5 +++++ 53 files changed, 384 insertions(+) create mode 100644 test/fuzz/fuzz-network-parser/21-vlan.network create mode 100644 test/fuzz/fuzz-network-parser/23-active-slave.network create mode 100644 test/fuzz/fuzz-network-parser/23-bond199.network create mode 100644 test/fuzz/fuzz-network-parser/23-emit-lldp.network create mode 100644 test/fuzz/fuzz-network-parser/23-primary-slave.network create mode 100644 test/fuzz/fuzz-network-parser/23-test1-bond199.network create mode 100644 test/fuzz/fuzz-network-parser/24-lldp.network create mode 100644 test/fuzz/fuzz-network-parser/24-search-domain.network create mode 100644 test/fuzz/fuzz-network-parser/25-address-link-section.network create mode 100644 test/fuzz/fuzz-network-parser/25-address-section-miscellaneous.network create mode 100644 test/fuzz/fuzz-network-parser/25-address-section.network create mode 100644 test/fuzz/fuzz-network-parser/25-ipv6-address-label-section.network create mode 100644 test/fuzz/fuzz-network-parser/25-link-section-unmanaged.network create mode 100644 test/fuzz/fuzz-network-parser/25-route-section.network create mode 100644 test/fuzz/fuzz-network-parser/25-route-tcp-window-settings.network create mode 100644 test/fuzz/fuzz-network-parser/25-route-type.network create mode 100644 test/fuzz/fuzz-network-parser/25-sysctl.network create mode 100644 test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1.network create mode 100644 test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2.network create mode 100644 test/fuzz/fuzz-network-parser/bridge99.network create mode 100644 test/fuzz/fuzz-network-parser/configure-without-carrier.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-anonymize.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-critical-connection.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only-ipv6-disabled.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-listen-port.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-route-metric.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-route-table.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client-timezone-router.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-client.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-server-timezone-router.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-server-veth-peer.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-server.network create mode 100644 test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer.network create mode 100644 test/fuzz/fuzz-network-parser/gretap.network create mode 100644 test/fuzz/fuzz-network-parser/gretun.network create mode 100644 test/fuzz/fuzz-network-parser/ip6gretap.network create mode 100644 test/fuzz/fuzz-network-parser/ip6tnl.network create mode 100644 test/fuzz/fuzz-network-parser/ipip.network create mode 100644 test/fuzz/fuzz-network-parser/ipv6-prefix-veth.network create mode 100644 test/fuzz/fuzz-network-parser/ipv6-prefix.network create mode 100644 test/fuzz/fuzz-network-parser/ipvlan.network create mode 100644 test/fuzz/fuzz-network-parser/macvlan.network create mode 100644 test/fuzz/fuzz-network-parser/macvtap.network create mode 100644 test/fuzz/fuzz-network-parser/routing-policy-rule.network create mode 100644 test/fuzz/fuzz-network-parser/sit.network create mode 100644 test/fuzz/fuzz-network-parser/test-static.network create mode 100644 test/fuzz/fuzz-network-parser/vti.network create mode 100644 test/fuzz/fuzz-network-parser/vti6.network create mode 100644 test/fuzz/fuzz-network-parser/vxlan.network diff --git a/test/fuzz/fuzz-network-parser/21-vlan.network b/test/fuzz/fuzz-network-parser/21-vlan.network new file mode 100644 index 0000000000..a4fa1decde --- /dev/null +++ b/test/fuzz/fuzz-network-parser/21-vlan.network @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +VLAN=vlan99 diff --git a/test/fuzz/fuzz-network-parser/23-active-slave.network b/test/fuzz/fuzz-network-parser/23-active-slave.network new file mode 100644 index 0000000000..59a65960e9 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/23-active-slave.network @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Network] +Bond=bond199 +ActiveSlave=true diff --git a/test/fuzz/fuzz-network-parser/23-bond199.network b/test/fuzz/fuzz-network-parser/23-bond199.network new file mode 100644 index 0000000000..31e5d12f75 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/23-bond199.network @@ -0,0 +1,2 @@ +[Match] +Name=bond199 diff --git a/test/fuzz/fuzz-network-parser/23-emit-lldp.network b/test/fuzz/fuzz-network-parser/23-emit-lldp.network new file mode 100644 index 0000000000..de35045388 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/23-emit-lldp.network @@ -0,0 +1,5 @@ +[Match] +Name=veth-peer + +[Network] +EmitLLDP=yes diff --git a/test/fuzz/fuzz-network-parser/23-primary-slave.network b/test/fuzz/fuzz-network-parser/23-primary-slave.network new file mode 100644 index 0000000000..380ae267a2 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/23-primary-slave.network @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Network] +Bond=bond199 +PrimarySlave=true diff --git a/test/fuzz/fuzz-network-parser/23-test1-bond199.network b/test/fuzz/fuzz-network-parser/23-test1-bond199.network new file mode 100644 index 0000000000..6e7c28dfe7 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/23-test1-bond199.network @@ -0,0 +1,6 @@ +[Match] +Name=test1 + +[Network] +Bond=bond199 +PrimarySlave=true diff --git a/test/fuzz/fuzz-network-parser/24-lldp.network b/test/fuzz/fuzz-network-parser/24-lldp.network new file mode 100644 index 0000000000..fbdfb1b672 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/24-lldp.network @@ -0,0 +1,5 @@ +[Match] +Name=veth99 + +[Network] +LLDP=yes diff --git a/test/fuzz/fuzz-network-parser/24-search-domain.network b/test/fuzz/fuzz-network-parser/24-search-domain.network new file mode 100644 index 0000000000..970b130ab0 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/24-search-domain.network @@ -0,0 +1,7 @@ +[Match] +Name=dummy98 + +[Network] +Address=192.168.42.100 +DNS=192.168.42.1 +Domains= one two three four five six seven eight nine ten diff --git a/test/fuzz/fuzz-network-parser/25-address-link-section.network b/test/fuzz/fuzz-network-parser/25-address-link-section.network new file mode 100644 index 0000000000..759e83c325 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-address-link-section.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Link] +MACAddress=00:01:02:aa:bb:cc diff --git a/test/fuzz/fuzz-network-parser/25-address-section-miscellaneous.network b/test/fuzz/fuzz-network-parser/25-address-section-miscellaneous.network new file mode 100644 index 0000000000..3a37d036ce --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-address-section-miscellaneous.network @@ -0,0 +1,10 @@ +[Match] +Name=dummy98 + +[Address] +Address=10.2.3.4/16 +PreferredLifetime=0 +Scope=link + +[Address] +Address=2001:0db8:0:f101::1/64 diff --git a/test/fuzz/fuzz-network-parser/25-address-section.network b/test/fuzz/fuzz-network-parser/25-address-section.network new file mode 100644 index 0000000000..d0fae69361 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-address-section.network @@ -0,0 +1,11 @@ +[Match] +Name=dummy98 + +[Address] +Address=10.2.3.4/16 +Peer=10.2.3.5/16 +Label=32 + +[Address] +Address=10.6.7.8/16 +Label=33 diff --git a/test/fuzz/fuzz-network-parser/25-ipv6-address-label-section.network b/test/fuzz/fuzz-network-parser/25-ipv6-address-label-section.network new file mode 100644 index 0000000000..945b7dcc45 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-ipv6-address-label-section.network @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[IPv6AddressLabel] +Label=4444 +Prefix=2004:da8:1:0::/64 diff --git a/test/fuzz/fuzz-network-parser/25-link-section-unmanaged.network b/test/fuzz/fuzz-network-parser/25-link-section-unmanaged.network new file mode 100644 index 0000000000..4fe4916031 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-link-section-unmanaged.network @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Link] +MACAddress=00:01:02:aa:bb:cc +Unmanaged=true diff --git a/test/fuzz/fuzz-network-parser/25-route-section.network b/test/fuzz/fuzz-network-parser/25-route-section.network new file mode 100644 index 0000000000..c9c7a722c5 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-route-section.network @@ -0,0 +1,8 @@ +[Match] +Name=dummy98 + +[Network] +Address=192.168.0.15/24 + +[Route] +Gateway=192.168.0.1 diff --git a/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings.network b/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings.network new file mode 100644 index 0000000000..e77a721740 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings.network @@ -0,0 +1,10 @@ +[Match] +Name=test1 + +[Route] +Destination=192.168.1.1 +InitialCongestionWindow=20 + +[Route] +Destination=192.168.1.2 +InitialAdvertisedReceiveWindow=30 diff --git a/test/fuzz/fuzz-network-parser/25-route-type.network b/test/fuzz/fuzz-network-parser/25-route-type.network new file mode 100644 index 0000000000..9a104137de --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-route-type.network @@ -0,0 +1,14 @@ +[Match] +Name=dummy98 + +[Route] +Type=blackhole +Destination=202.54.1.2 + +[Route] +Type=unreachable +Destination=202.54.1.3 + +[Route] +Type=prohibit +Destination=202.54.1.4 diff --git a/test/fuzz/fuzz-network-parser/25-sysctl.network b/test/fuzz/fuzz-network-parser/25-sysctl.network new file mode 100644 index 0000000000..2452fb7e85 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/25-sysctl.network @@ -0,0 +1,10 @@ +[Match] +Name=dummy98 + +[Network] +IPForward=true +IPv6PrivacyExtensions=true +IPv6DuplicateAddressDetection=3 +IPv6HopLimit=5 +IPv4ProxyARP=true +IPv6ProxyNDP=true diff --git a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1.network b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1.network new file mode 100644 index 0000000000..84f221d538 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1.network @@ -0,0 +1,11 @@ +[Match] +Name=dummy98 + +[Network] +Bridge=bridge99 + +[Bridge] +Cost=400 +HairPin = true +FastLeave = true +UnicastFlood = true diff --git a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2.network b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2.network new file mode 100644 index 0000000000..45ec2de999 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2.network @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +Bridge=bridge99 diff --git a/test/fuzz/fuzz-network-parser/bridge99.network b/test/fuzz/fuzz-network-parser/bridge99.network new file mode 100644 index 0000000000..39e48ce2e1 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/bridge99.network @@ -0,0 +1,6 @@ +[Match] +Name=bridge99 + +[Network] +Address=192.168.0.15/24 +Gateway=192.168.0.1 diff --git a/test/fuzz/fuzz-network-parser/configure-without-carrier.network b/test/fuzz/fuzz-network-parser/configure-without-carrier.network new file mode 100644 index 0000000000..5bd9d7e84a --- /dev/null +++ b/test/fuzz/fuzz-network-parser/configure-without-carrier.network @@ -0,0 +1,7 @@ +[Match] +Name=test1 + +[Network] +Address=192.168.0.15/24 +Gateway=192.168.0.1 +ConfigureWithoutCarrier=true diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-anonymize.network b/test/fuzz/fuzz-network-parser/dhcp-client-anonymize.network new file mode 100644 index 0000000000..a910cba0f7 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-anonymize.network @@ -0,0 +1,16 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 +IPv6AcceptRA=false + +[DHCP] +Anonymize=true +UseMTU=true +UseRoutes=true +SendHostname=true +UseHostname=true +Hostname=test-hostname +ClientIdentifier=mac +VendorClassIdentifier=SusantVendorTest diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-critical-connection.network b/test/fuzz/fuzz-network-parser/dhcp-client-critical-connection.network new file mode 100644 index 0000000000..0e65dec0ae --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-critical-connection.network @@ -0,0 +1,9 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 +IPv6AcceptRA=false + +[DHCP] +CriticalConnection=true diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings.network new file mode 100644 index 0000000000..5c4ca22ab7 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings.network @@ -0,0 +1,15 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 +IPv6AcceptRA=false + +[DHCP] +UseMTU=true +UseRoutes=true +SendHostname=true +UseHostname=true +Hostname=test-hostname +ClientIdentifier=mac +VendorClassIdentifier=SusantVendorTest diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only-ipv6-disabled.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only-ipv6-disabled.network new file mode 100644 index 0000000000..c980bf9fca --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only-ipv6-disabled.network @@ -0,0 +1,6 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 +IPv6AcceptRA=false diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only.network new file mode 100644 index 0000000000..9bc019a674 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only.network @@ -0,0 +1,5 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only.network new file mode 100644 index 0000000000..1f70c3b86d --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only.network @@ -0,0 +1,5 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv6 diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit.network new file mode 100644 index 0000000000..52fa58729e --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit.network @@ -0,0 +1,8 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv6 + +[DHCP] +RapidCommit=false diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-listen-port.network b/test/fuzz/fuzz-network-parser/dhcp-client-listen-port.network new file mode 100644 index 0000000000..73ac364630 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-listen-port.network @@ -0,0 +1,8 @@ +[Match] +Name=veth99 + +[Network] +DHCP=yes + +[DHCP] +ListenPort=5555 diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-route-metric.network b/test/fuzz/fuzz-network-parser/dhcp-client-route-metric.network new file mode 100644 index 0000000000..aa04aaef33 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-route-metric.network @@ -0,0 +1,10 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 +IPv6AcceptRA=false + +[DHCP] +UseRoutes=true +RouteMetric=24 diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-route-table.network b/test/fuzz/fuzz-network-parser/dhcp-client-route-table.network new file mode 100644 index 0000000000..75f16aa22d --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-route-table.network @@ -0,0 +1,10 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 +IPv6AcceptRA=false + +[DHCP] +UseRoutes=true +RouteTable=12 diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router.network b/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router.network new file mode 100644 index 0000000000..6316f9cf59 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router.network @@ -0,0 +1,8 @@ +[Match] +Name=veth99 + +[Network] +IPv6AcceptRA=false +DHCP=ipv4 +UseRoutes=true +UseTimezone=true diff --git a/test/fuzz/fuzz-network-parser/dhcp-client.network b/test/fuzz/fuzz-network-parser/dhcp-client.network new file mode 100644 index 0000000000..5629bc48e4 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client.network @@ -0,0 +1,5 @@ +[Match] +Name=veth99 + +[Network] +DHCP=yes diff --git a/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router.network b/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router.network new file mode 100644 index 0000000000..3ebbf05d3e --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router.network @@ -0,0 +1,13 @@ +[Match] +Name=veth-peer + +[Network] +IPv6AcceptRA=false +Address=192.168.5.1/24 +DHCPServer=yes + +[DHCPServer] +PoolOffset=10 +PoolSize=50 +EmitRouter=yes +Timezone=Europe/Berlin diff --git a/test/fuzz/fuzz-network-parser/dhcp-server-veth-peer.network b/test/fuzz/fuzz-network-parser/dhcp-server-veth-peer.network new file mode 100644 index 0000000000..7b38e72b7e --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-server-veth-peer.network @@ -0,0 +1,6 @@ +[Match] +Name=veth-peer + +[Network] +Address=2600::1 +Address=192.168.5.1/24 diff --git a/test/fuzz/fuzz-network-parser/dhcp-server.network b/test/fuzz/fuzz-network-parser/dhcp-server.network new file mode 100644 index 0000000000..9e49691a9b --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-server.network @@ -0,0 +1,12 @@ +[Match] +Name=veth-peer + +[Network] +Address=192.168.5.1/24 +DHCPServer=yes + +[DHCPServer] +PoolOffset=10 +PoolSize=50 +DNS=192.168.5.1 +NTP=192.168.5.1 diff --git a/test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer.network b/test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer.network new file mode 100644 index 0000000000..5c91d65432 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer.network @@ -0,0 +1,6 @@ +[Match] +Name=veth-peer + +[Network] +Address=192.168.0.1 +Address=192.168.5.1 diff --git a/test/fuzz/fuzz-network-parser/gretap.network b/test/fuzz/fuzz-network-parser/gretap.network new file mode 100644 index 0000000000..88b9250349 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/gretap.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=gretap99 diff --git a/test/fuzz/fuzz-network-parser/gretun.network b/test/fuzz/fuzz-network-parser/gretun.network new file mode 100644 index 0000000000..376074cb1b --- /dev/null +++ b/test/fuzz/fuzz-network-parser/gretun.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=gretun99 diff --git a/test/fuzz/fuzz-network-parser/ip6gretap.network b/test/fuzz/fuzz-network-parser/ip6gretap.network new file mode 100644 index 0000000000..cad0bae04a --- /dev/null +++ b/test/fuzz/fuzz-network-parser/ip6gretap.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=ip6gretap99 diff --git a/test/fuzz/fuzz-network-parser/ip6tnl.network b/test/fuzz/fuzz-network-parser/ip6tnl.network new file mode 100644 index 0000000000..41e3448495 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/ip6tnl.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=ip6tnl99 diff --git a/test/fuzz/fuzz-network-parser/ipip.network b/test/fuzz/fuzz-network-parser/ipip.network new file mode 100644 index 0000000000..4ce6714904 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/ipip.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=ipiptun99 diff --git a/test/fuzz/fuzz-network-parser/ipv6-prefix-veth.network b/test/fuzz/fuzz-network-parser/ipv6-prefix-veth.network new file mode 100644 index 0000000000..3d2acecde2 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/ipv6-prefix-veth.network @@ -0,0 +1,5 @@ +[Match] +Name=veth99 + +[Network] +IPv6AcceptRA=true diff --git a/test/fuzz/fuzz-network-parser/ipv6-prefix.network b/test/fuzz/fuzz-network-parser/ipv6-prefix.network new file mode 100644 index 0000000000..c1932a84d3 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/ipv6-prefix.network @@ -0,0 +1,10 @@ +[Match] +Name=veth-peer + +[Network] +IPv6PrefixDelegation=yes + +[IPv6Prefix] +Prefix=2002:da8:1:0::/64 +PreferredLifetimeSec=1000s +ValidLifetimeSec=2100s diff --git a/test/fuzz/fuzz-network-parser/ipvlan.network b/test/fuzz/fuzz-network-parser/ipvlan.network new file mode 100644 index 0000000000..d053220550 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/ipvlan.network @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +IPVLAN=ipvlan99 diff --git a/test/fuzz/fuzz-network-parser/macvlan.network b/test/fuzz/fuzz-network-parser/macvlan.network new file mode 100644 index 0000000000..a41c1f916c --- /dev/null +++ b/test/fuzz/fuzz-network-parser/macvlan.network @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +MACVLAN=macvlan99 diff --git a/test/fuzz/fuzz-network-parser/macvtap.network b/test/fuzz/fuzz-network-parser/macvtap.network new file mode 100644 index 0000000000..6ee99ab9ce --- /dev/null +++ b/test/fuzz/fuzz-network-parser/macvtap.network @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +MACVTAP=macvtap99 diff --git a/test/fuzz/fuzz-network-parser/routing-policy-rule.network b/test/fuzz/fuzz-network-parser/routing-policy-rule.network new file mode 100644 index 0000000000..46b87c5a9a --- /dev/null +++ b/test/fuzz/fuzz-network-parser/routing-policy-rule.network @@ -0,0 +1,10 @@ +[Match] +Name=test1 + +[RoutingPolicyRule] +TypeOfService=0x08 +Table=7 +From= 192.168.100.18 +Priority=111 +IncomingInterface=test1 +OutgoingInterface=test1 diff --git a/test/fuzz/fuzz-network-parser/sit.network b/test/fuzz/fuzz-network-parser/sit.network new file mode 100644 index 0000000000..84e5af0ff0 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/sit.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=sittun99 diff --git a/test/fuzz/fuzz-network-parser/test-static.network b/test/fuzz/fuzz-network-parser/test-static.network new file mode 100644 index 0000000000..636c55c8e3 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/test-static.network @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Network] +Address=192.168.0.15/24 +Gateway=192.168.0.1 diff --git a/test/fuzz/fuzz-network-parser/vti.network b/test/fuzz/fuzz-network-parser/vti.network new file mode 100644 index 0000000000..7fbad6a82d --- /dev/null +++ b/test/fuzz/fuzz-network-parser/vti.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=vtitun99 diff --git a/test/fuzz/fuzz-network-parser/vti6.network b/test/fuzz/fuzz-network-parser/vti6.network new file mode 100644 index 0000000000..49a9d11fff --- /dev/null +++ b/test/fuzz/fuzz-network-parser/vti6.network @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Network] +Tunnel=vti6tun99 diff --git a/test/fuzz/fuzz-network-parser/vxlan.network b/test/fuzz/fuzz-network-parser/vxlan.network new file mode 100644 index 0000000000..80b405574c --- /dev/null +++ b/test/fuzz/fuzz-network-parser/vxlan.network @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +VXLAN=vxlan99 -- cgit v1.2.3 From d0f51aa9cd8e6bc78311356e17581386110ed44d Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Mon, 5 Nov 2018 00:39:47 +0100 Subject: tests: add a reporoducer for https://github.com/systemd/systemd/issues/10639 --- test/fuzz/fuzz-network-parser/github-10639 | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/fuzz/fuzz-network-parser/github-10639 diff --git a/test/fuzz/fuzz-network-parser/github-10639 b/test/fuzz/fuzz-network-parser/github-10639 new file mode 100644 index 0000000000..530a29b241 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/github-10639 @@ -0,0 +1,8 @@ +[Match] +Name=dummy98 + +[Network] +Address=192.168.0.15/2424 + +[Rou] +Gateway=192.136.0.1 -- cgit v1.2.3 From cf02fd1b7a80122b2a4366fb63925cd81dd80ce0 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Tue, 6 Nov 2018 19:36:40 +0100 Subject: tests: replace AdActorSysPrio with AdActorSystemPriority This is a follow-up to https://github.com/systemd/systemd/pull/10653. --- test/fuzz/fuzz-netdev-parser/25-bond.netdev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fuzz/fuzz-netdev-parser/25-bond.netdev b/test/fuzz/fuzz-netdev-parser/25-bond.netdev index 61c54c4de0..4e4885c44c 100644 --- a/test/fuzz/fuzz-netdev-parser/25-bond.netdev +++ b/test/fuzz/fuzz-netdev-parser/25-bond.netdev @@ -11,7 +11,7 @@ UpDelaySec=2s DownDelaySec=2s ResendIGMP=4 MinLinks=1 -AdActorSysPrio=1218 +AdActorSystemPriority=1218 AdUserPortKey=811 AdActorSystem=00:11:22:33:44:55 # feed the sanitizer -- cgit v1.2.3 From 220fa139dea5f2c18465f696333b2e646d0e40b5 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Tue, 6 Nov 2018 19:42:29 +0100 Subject: tests: add a couple of files containing all the sections and directives This should help the fuzzers to discover code paths faster. In case anyone is interested, they were generated with the following script ``` perl -aF'/[\s,]+/' -ne ' if (my ($s, $d) = ($F[0] =~ /^([^\s\.]+)\.([^\s\.]+)$/)) { $d{$s}{$d} = 1; } END { while (my ($key, $value) = each %d) { printf "[%s]\n%s\n", $key, join("\n", keys(%$value)) }}' ``` by passing src/network/networkd-network-gperf.gperf and src/network/netdev/netdev-gperf.gperf to it. --- test/fuzz/fuzz-netdev-parser/directives.netdev | 153 +++++++++++++++++++ test/fuzz/fuzz-network-parser/directives.network | 187 +++++++++++++++++++++++ 2 files changed, 340 insertions(+) create mode 100644 test/fuzz/fuzz-netdev-parser/directives.netdev create mode 100644 test/fuzz/fuzz-network-parser/directives.network diff --git a/test/fuzz/fuzz-netdev-parser/directives.netdev b/test/fuzz/fuzz-netdev-parser/directives.netdev new file mode 100644 index 0000000000..4725d2dad4 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/directives.netdev @@ -0,0 +1,153 @@ +[VLAN] +MVRP= +LooseBinding= +ReorderHeader= +Id= +GVRP= +[MACVLAN] +Mode= +[WireGuard] +ListenPort= +PrivateKey= +FwMark= +[MACVTAP] +Mode= +[Match] +Architecture= +Host= +KernelVersion= +Virtualization= +KernelCommandLine= +[GENEVE] +DestinationPort= +TTL= +UDP6ZeroCheckSumTx= +TOS= +Id= +UDPChecksum= +UDP6ZeroChecksumTx= +FlowLabel= +UDP6ZeroChecksumRx= +Remote= +UDP6ZeroCheckSumRx= +[Bridge] +ForwardDelaySec= +HelloTimeSec= +MaxAgeSec= +STP= +MulticastSnooping= +DefaultPVID= +MulticastQuerier= +AgeingTimeSec= +Priority= +GroupForwardMask= +VLANFiltering= +[VRF] +TableId= +Table= +[Peer] +MACAddress= +Name= +[WireGuardPeer] +Endpoint= +PresharedKey= +PersistentKeepalive= +PublicKey= +AllowedIPs= +[Tunnel] +FooOverUDP= +IPv6FlowLabel= +Remote= +AllowLocalRemote= +Local= +TOS= +Independent= +Key= +InputKey= +Encapsulation= +Mode= +OutputKey= +DiscoverPathMTU= +FOUDestinationPort= +CopyDSCP= +EncapsulationLimit= +TTL= +FOUSourcePort= +[VXLAN] +UDP6ZeroChecksumRx= +ARPProxy= +FlowLabel= +Local= +RemoteChecksumTx= +RouteShortCircuit= +Remote= +L3MissNotification= +Group= +FDBAgeingSec= +MacLearning= +Id= +RemoteChecksumRx= +TOS= +L2MissNotification= +UDP6ZeroChecksumTx= +UDP6ZeroCheckSumRx= +UDPCheckSum= +GroupPolicyExtension= +MaximumFDBEntries= +TTL= +DestinationPort= +ReduceARPProxy= +PortRange= +UDPChecksum= +UDP6ZeroCheckSumTx= +[VXCAN] +Peer= +[Bond] +LearnPacketIntervalSec= +TransmitHashPolicy= +MIIMonitorSec= +PacketsPerSlave= +DownDelaySec= +PrimaryReselectPolicy= +ResendIGMP= +ARPAllTargets= +AdActorSystemPriority= +UpDelaySec= +AdSelect= +AdActorSystem= +AdUserPortKey= +FailOverMACPolicy= +ARPValidate= +Mode= +GratuitousARP= +ARPIPTargets= +MinLinks= +LACPTransmitRate= +ARPIntervalSec= +AllSlavesActive= +[FooOverUDP] +Protocol= +Port= +Encapsulation= +[Tap] +MultiQueue= +OneQueue= +User= +Group= +PacketInfo= +VNetHeader= +[IPVLAN] +Mode= +Flags= +[Tun] +OneQueue= +MultiQueue= +PacketInfo= +Group= +User= +[NetDev] +Kind= +MACAddress= +MTUBytes= +Description= +Name= diff --git a/test/fuzz/fuzz-network-parser/directives.network b/test/fuzz/fuzz-network-parser/directives.network new file mode 100644 index 0000000000..766c76008f --- /dev/null +++ b/test/fuzz/fuzz-network-parser/directives.network @@ -0,0 +1,187 @@ +[Bridge] +Cost= +UseBPDU= +HairPin= +UnicastFlood= +FastLeave= +Priority= +AllowPortToBeRoot= +[Match] +KernelVersion= +Type= +Driver= +Architecture= +Path= +Name= +Virtualization= +KernelCommandLine= +Host= +MACAddress= +[Link] +RequiredForOnline= +ARP= +AllMulticast= +Unmanaged= +MTUBytes= +Multicast= +MACAddress= +[BridgeFDB] +VLANId= +MACAddress= +[DHCP] +UseDomains= +UseRoutes= +IAID= +UserClass= +UseNTP= +RapidCommit= +ForceDHCPv6PDOtherInformation= +UseMTU= +UseDomainName= +RouteMetric= +SendHostname= +Anonymize= +VendorClassIdentifier= +Hostname= +DUIDType= +UseHostname= +UseDNS= +CriticalConnection= +DUIDRawData= +RequestBroadcast= +ClientIdentifier= +ListenPort= +UseTimezone= +RouteTable= +[Route] +Destination= +Protocol= +Table= +Gateway= +InitialAdvertisedReceiveWindow= +GatewayOnlink= +Type= +InitialCongestionWindow= +IPv6Preference= +PreferredSource= +Scope= +MTUBytes= +QuickAck= +Source= +Metric= +[Network] +IPv6DuplicateAddressDetection= +IPMasquerade= +ProxyARP= +PrimarySlave= +IPv4LLRoute= +Address= +IPv6ProxyNDPAddress= +IPv6AcceptRA= +IPv6AcceptRouterAdvertisements= +DNSSECNegativeTrustAnchors= +MACVTAP= +IPv6PrivacyExtensions= +MACVLAN= +MulticastDNS= +LLDP= +Tunnel= +Gateway= +IPv4LL= +IPVLAN= +EmitLLDP= +IPv6MTUBytes= +IPv4ProxyARP= +Bridge= +DNSOverTLS= +Bond= +IPv6ProxyNDP= +DNS= +ActiveSlave= +LLMNR= +DNSSEC= +IPv6HopLimit= +IPForward= +IPv6Token= +Description= +VXLAN= +LinkLocalAddressing= +ConfigureWithoutCarrier= +NTP= +DHCP= +Domains= +IPv6PrefixDelegation= +VLAN= +DHCPServer= +BindCarrier= +VRF= +[IPv6Prefix] +Prefix= +OnLink= +PreferredLifetimeSec= +AddressAutoconfiguration= +ValidLifetimeSec= +[BridgeVLAN] +EgressUntagged= +VLAN= +PVID= +[CAN] +SamplePoint= +BitRate= +RestartSec= +[Address] +DuplicateAddressDetection= +AutoJoin= +PreferredLifetime= +Address= +Scope= +HomeAddress= +PrefixRoute= +ManageTemporaryAddress= +Broadcast= +Peer= +Label= +[RoutingPolicyRule] +Table= +IncomingInterface= +To= +OutgoingInterface= +From= +TypeOfService= +Priority= +FirewallMark= +[IPv6PrefixDelegation] +RouterPreference= +DNSLifetimeSec= +DNS= +RouterLifetimeSec= +Domains= +EmitDNS= +EmitDomains= +Managed= +OtherInformation= +[IPv6AddressLabel] +Label= +Prefix= +[IPv6AcceptRA] +UseDomains= +RouteTable= +UseDNS= +[DHCPServer] +EmitNTP= +PoolSize= +PoolOffset= +Timezone= +EmitDNS= +NTP= +EmitRouter= +MaxLeaseTimeSec= +DefaultLeaseTimeSec= +EmitTimezone= +DNS= +[DHCPv4] +UseHostname= +UseMTU= +UseDomainName= +CriticalConnection= +UseDNS= -- cgit v1.2.3 From 3ff074bd855b3c22915fb93d684ad7db23e867b7 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Tue, 6 Nov 2018 19:51:45 +0100 Subject: oss-fuzz.sh: copy dictionaries along with "options" files We currently don't have any upstream but it doesn't mean that it should be impossible to experiment with local ones :-) --- tools/oss-fuzz.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh index df72e47d7d..9a116be114 100755 --- a/tools/oss-fuzz.sh +++ b/tools/oss-fuzz.sh @@ -52,4 +52,5 @@ wget -O $OUT/fuzz-json_seed_corpus.zip https://storage.googleapis.com/skia-fuzze wget -O $OUT/fuzz-json.dict https://raw.githubusercontent.com/rc0r/afl-fuzz/master/dictionaries/json.dict find $build -maxdepth 1 -type f -executable -name "fuzz-*" -exec mv {} $OUT \; +find src -type f -name "fuzz-*.dict" -exec cp {} $OUT \; cp src/fuzz/*.options $OUT -- cgit v1.2.3