summaryrefslogtreecommitdiff
path: root/test/fuzz
Commit message (Collapse)AuthorAgeFilesLines
...
* shared/bootspec: add missing terminator to tableZbigniew Jędrzejewski-Szmek2022-05-081-0/+21
|
* fuzz-bootspec: also add loader autoentriesZbigniew Jędrzejewski-Szmek2022-05-081-0/+5
|
* fuzz-bootspec: one more test case that was fixed in strv codeZbigniew Jędrzejewski-Szmek2022-05-081-0/+1
|
* shared/bootspec: avoid crashing on config without a valueZbigniew Jędrzejewski-Szmek2022-05-081-0/+1
|
* Add fuzzer for the bootspec parserZbigniew Jędrzejewski-Szmek2022-05-081-0/+17
|
* fuzz-network-parser: drop ".network" and shorten namesZbigniew Jędrzejewski-Szmek2022-05-0459-0/+0
| | | | | All fuzzer inputs as .network files. Some had the suffix, others didn't. So drop it everywhere, and also shorten some other names.
* fuzz: rename test cases for brevity and meaningZbigniew Jędrzejewski-Szmek2022-05-0425-0/+0
| | | | | | Those long indentifiers make test output very wide, and they are ultimately not very useful for humans to look at. Let's use some short string to identify the test failure instead.
* network: tunnel: handle null address as "any"Yu Watanabe2022-04-171-0/+0
| | | | | | Fixes oss-fuzz#44881 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44881). Fixes #23098.
* Add ConditionCPUFeature to load-fragment-gperf.gperf (#23076)Eduard Tolosa2022-04-141-0/+2
| | | Fixes #23075
* network: rename netdev kind virtual-wlan -> wlanYu Watanabe2022-03-281-1/+1
| | | | | | The Kind= setting in [Match] section of .network files takes "wlan". This makes the same setting in .netdev files matches the one in .network files.
* fuzz: rename fuzz-dhcp-server-relay-message to fuzz-dhcp-server-relayZbigniew Jędrzejewski-Szmek2022-03-213-0/+0
| | | | | We can only relay messages, so we can make the name shorter without losing informational value. This makes meson test output look better.
* fuzz: rename the longest test samplesZbigniew Jędrzejewski-Szmek2022-03-214-0/+0
| | | | | | | "meson test" uses a test name generated from the file name and those long names cause the test log output to exceed terminal width which looks bad. Let's replace some long names with more-meaningful names that actually say something about the tests.
* network: dhcp: rename NextServer= and Filename= settingsYu Watanabe2022-03-111-2/+3
| | | | | | | And make the settings configures DHCP option 66 and 67. Follow-ups for #22615. Fixes #22661.
* network: add NextServer= and Filename= setting to [DHCPServer] sectionYu Watanabe2022-02-251-0/+2
| | | | Closes #4403.
* Merge pull request #22591 from evverx/no-depsFrantisek Sumsal2022-02-231-2/+3
|\ | | | | ci: build systemd without optional dependencies
| * meson: pass skip-deps on to the fuzzers as wellEvgeny Vereshchagin2022-02-221-2/+3
| | | | | | | | | | | | they should be tested without optional dependecines as well. CIFuzz kind of covers that but let's just make sure local builds are fine as well.
* | watchdog: add setting to configure pretimeout governorLuca Boccassi2022-02-221-0/+1
| |
* | watchdog: Add watchdog pretimeout supportCurtis Klein2022-02-221-0/+1
|/ | | | | | | | | | | | | | Add support for managing and configuring watchdog pretimeout values if the watchdog hardware supports it. The ping interval is adjusted to account for a pretimeout so that it will still ping at half the timeout interval before a pretimeout event would be triggered. By default the pretimeout defaults to 0s or disabled. The RuntimeWatchdogPreSec config option is added to allow the pretimeout to be specified (similar to RuntimeWatchdogSec). The RuntimeWatchdogPreUSec dbus property is added to override the pretimeout value at runtime (similar to RuntimeWatchdogUSec). Setting the pretimeout to 0s will disable the pretimeout.
* network,udev/net: add Kind= settings in [Match] sectionYu Watanabe2022-02-172-0/+2
| | | | | | | This may be useful for writing .network or .link files matching with virtual interfaces. Closes #22541.
* Merge pull request #22502 from yuwata/udev-net-virtual-wlan-interfaceYu Watanabe2022-02-161-0/+4
|\ | | | | network: add virtual wlan interface support
| * network: add support to create wlan virtual interfaceYu Watanabe2022-02-151-0/+4
| | | | | | | | Closes #18977.
* | fuzz-dhcp6-client: merge with fuzz-dhcp6-client-sendYu Watanabe2022-02-143-0/+0
|/
* udev/net: support Match.Firmware= in .link files (#22462)Alvin Šipraga2022-02-102-0/+2
| | | | | | | In cbcdcaaa0ec5 ("Add support for conditions on the machines firmware") a new Firmware= directive was added for .netdev and .network files. While it was also documented to work on .link files, in actual fact the support was missing. Add that one extra line to make it work, and also update the fuzzer directives.
* Add support for `isolated` parameterSanta Wiryaman2022-02-093-0/+3
| | | | | | | | | | | | | | | | | | Add the "Isolated" parameter in the *.network file, e.g., [Bridge] Isolated=true|false When the Isolated parameter is true, traffic coming out of this port will only be forward to other ports whose Isolated parameter is false. When Isolated is not specified, the port uses the kernel default setting (false). The "Isolated" parameter was introduced in Linux 4.19. See man bridge(8) for more details. But even though the kernel and bridge/iproute2 recognize the "Isolated" parameter, systemd-networkd did not have a way to set it.
* udev/net: support to set MDI-X modeYu Watanabe2022-02-081-0/+1
| | | | Closes #22386.
* Merge pull request #22355 from yuwata/network-tunnel-externalAnita Zhang2022-02-031-0/+1
|\ | | | | network: tunnel: support external mode
| * network: tunnel: support external modeYu Watanabe2022-02-031-0/+1
| | | | | | | | Closes #22352.
* | tests: pass FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION to fuzzersEvgeny Vereshchagin2022-02-031-2/+3
| | | | | | | | | | | | to let them use reproducible identifiers, which should make it possible to really use files copied from OSS-Fuzz to reproduce issues on GHActions and locally. Prompted by https://github.com/systemd/systemd/pull/22365
* | tests: fuzz client_send_messageEvgeny Vereshchagin2022-02-033-0/+0
|/ | | | | | | to make sure outgoing packets based on incoming packets are fine. It's just another follow-up to https://github.com/systemd/systemd/pull/10200. Better late than never :-)
* tests: add a file triggering a memory leak in dhcp_lease_parse_search_domainsEvgeny Vereshchagin2022-01-291-0/+0
|
* tests: fuzz client_handle_offerEvgeny Vereshchagin2022-01-291-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out that part of systemd isn't covered by any fuzz targets and that's not ideal considering that it parses data sent remotely. The fuzzer triggers an infinite loop in lease_parse_routes as soon as it starts so it seems to be working :-) ``` INFO: Running with entropic power schedule (0xFF, 100). INFO: Seed: 23620602 INFO: Loaded 2 modules (182073 inline 8-bit counters): 176548 [0x7fdf511fc8d0, 0x7fdf51227a74), 5525 [0x5f6ef0, 0x5f8485), INFO: Loaded 2 PC tables (182073 PCs): 176548 [0x7fdf51227a78,0x7fdf514d94b8), 5525 [0x5f8488,0x60ddd8), ./build/fuzz-dhcp-client: Running 1 inputs 1 time(s) each. Running: test/fuzz/fuzz-dhcp-client/timeout-ed34161922c7075c4773f2ada3dee8685d220980 ALARM: working on the last Unit for 31 seconds and the timeout value is 30 (use -timeout=N to change) ==80731== ERROR: libFuzzer: timeout after 31 seconds #0 0x51b32e in __sanitizer_print_stack_trace (/home/vagrant/systemd/build/fuzz-dhcp-client+0x51b32e) #1 0x4689e9 in fuzzer::PrintStackTrace() (/home/vagrant/systemd/build/fuzz-dhcp-client+0x4689e9) #2 0x44a0f4 in fuzzer::Fuzzer::StaticAlarmCallback() (/home/vagrant/systemd/build/fuzz-dhcp-client+0x44a0f4) #3 0x7fdf4f8b474f (/lib64/libc.so.6+0x4274f) #4 0x465fee in __sanitizer_cov_trace_const_cmp4 (/home/vagrant/systemd/build/fuzz-dhcp-client+0x465fee) #5 0x57eee5 in lease_parse_routes /home/vagrant/systemd/build/../src/libsystemd-network/sd-dhcp-lease.c:495:23 #6 0x57baf3 in dhcp_lease_parse_options /home/vagrant/systemd/build/../src/libsystemd-network/sd-dhcp-lease.c:701:21 #7 0x572450 in parse_options /home/vagrant/systemd/build/../src/libsystemd-network/dhcp-option.c:348:33 #8 0x571cea in dhcp_option_parse /home/vagrant/systemd/build/../src/libsystemd-network/dhcp-option.c:381:21 #9 0x559a01 in client_handle_offer /home/vagrant/systemd/build/../src/libsystemd-network/sd-dhcp-client.c:1543:13 #10 0x5592bd in LLVMFuzzerTestOneInput /home/vagrant/systemd/build/../src/libsystemd-network/fuzz-dhcp-client.c:78:9 #11 0x44a379 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/vagrant/systemd/build/fuzz-dhcp-client+0x44a379) #12 0x42ae1f in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) (/home/vagrant/systemd/build/fuzz-dhcp-client+0x42ae1f) #13 0x432ade in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/vagrant/systemd/build/fuzz-dhcp-client+0x432ade) #14 0x421f86 in main (/home/vagrant/systemd/build/fuzz-dhcp-client+0x421f86) #15 0x7fdf4f89f55f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f) #16 0x7fdf4f89f60b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b) #17 0x421fd4 in _start (/home/vagrant/systemd/build/fuzz-dhcp-client+0x421fd4) SUMMARY: libFuzzer: timeout ```
* sd-dhcp-server: refuse too large packet to sendYu Watanabe2022-01-281-0/+0
| | | | Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44134.
* tests: fuzz dhcp_server_relay_messageEvgeny Vereshchagin2022-01-272-0/+0
| | | | | | | | It's a follow-up to https://github.com/systemd/systemd/pull/19384 where dhcp_server_relay_message was introduced. This PR was prompted by https://github.com/systemd/systemd/pull/22236#issuecomment-1020113269 for the most part.
* fuzz-dhcp-server: duplicate input dataYu Watanabe2022-01-241-0/+0
| | | | | As `dhcp_server_handle_message()` -> `ensure_sane_request()` may modify the input data, and that causes error in some fuzzing engine.
* fuzz: add testcases of heap-buffer-overflow for sd-dhcp-serverYu Watanabe2022-01-242-0/+0
|
* core: add ExtensionDirectories= settingLuca Boccassi2022-01-215-0/+5
| | | | | | | | Add a new setting that follows the same principle and implementation as ExtensionImages, but using directories as sources. It will be used to implement support for extending portable images with directories, since portable services can already use a directory as root.
* udev/net: allow to set number of SR-IOV virtual functionsYu Watanabe2022-01-191-0/+1
| | | | This adds SR-IOVVirtualFunctions= setting in [Link] section.
* udev/net: also support [SR-IOV] section in .link filesYu Watanabe2022-01-191-0/+10
| | | | | | | | The same section is already supported by .network files. But such low-level inteerface setting should be done by udevd, instead of networkd. Let's also support the same semantics by .link files. Prompted by https://github.com/systemd/systemd/issues/20474#issuecomment-901901360.
* meson: Use echo to list filesJan Janssen2022-01-111-1/+1
| | | | | | No need to invoke ls when we are just interested in file names. Also, the cd to source root makes the output identical to "git ls-files" (relative instead of absolute paths).
* meson: Add check argument to remaining run_command() callsJan Janssen2022-01-111-3/+4
|
* test: build fuzzers with --werror if setFrantisek Sumsal2022-01-041-1/+4
| | | | to catch issues like systemd/systemd#21996.
* path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec=Luca Boccassi2021-12-181-0/+2
| | | | | Given there's now a default for these settings, also allow users to configure them, matching socket units
* meson: Drop meson version compare for fuzz testJan Janssen2021-12-121-9/+1
| | | | We are depending on meson >= 0.53.2 now, so this check can be dropped.
* network: dhcp-pd: add 6rd supportYu Watanabe2021-12-071-0/+1
| | | | Closes #19152.
* network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]Yu Watanabe2021-12-071-0/+8
| | | | | | | This just changes the names of settings, variables, functions, files, and so on. No functionality is changed. Preparation for supporting 6rd.
* network: dhcp6pd: always use main route table for unreachable routeYu Watanabe2021-12-071-1/+0
| | | | This mostly reverts e47bcb7d0b2cb07c5c594e374baeb061bb7f88ba.
* network: add support to configure IPoIB interfacesYu Watanabe2021-12-051-0/+3
|
* network/netdev: add support to create IPoIB subinterfaceYu Watanabe2021-12-042-0/+5
|
* core: add Condition[Memory/CPU/IO]PressureLuca Boccassi2021-12-012-0/+12
| | | | | | | | | | By default checks PSI on /proc/pressure, and causes a unit to be skipped if the threshold is above the given configuration for the avg300 measurement. Also allow to pass a custom timespan, and a particular slice unit to check under. Fixes #20139
* network: wireguard: automatically configure routes to addresses specified in ↵Yu Watanabe2021-12-011-0/+4
| | | | | | AllowedIPs= Closes #14176.