1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
systemd/test/fuzz
Frantisek Sumsal c07f18ffd4 shared: fix integer overflow in calendarspec
Fixes: oss-fuzz#22208

```
test/fuzz/fuzz-calendarspec/oss-fuzz-22208... ../src/shared/calendarspec.c:666:48: runtime error: signed integer overflow: 2147000000 + 1000000 cannot be represented in type 'int'
    #0 0x7f0b9f6cc56a in prepend_component ../src/shared/calendarspec.c:666
    #1 0x7f0b9f6cd03a in parse_chain ../src/shared/calendarspec.c:718
    #2 0x7f0b9f6cea1c in parse_calendar_time ../src/shared/calendarspec.c:845
    #3 0x7f0b9f6d1397 in calendar_spec_from_string ../src/shared/calendarspec.c:1084
    #4 0x401570 in LLVMFuzzerTestOneInput ../src/fuzz/fuzz-calendarspec.c:17
    #5 0x401ae0 in main ../src/fuzz/fuzz-main.c:39
    #6 0x7f0b9e31b1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
    #7 0x40122d in _start (/home/fsumsal/repos/systemd/build/fuzz-calendarspec+0x40122d)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/shared/calendarspec.c:666:48 in
```
2020-05-15 16:07:29 +02:00
..
fuzz-bus-message bus-message: validate signature in gvariant messages 2019-04-11 14:01:38 +02:00
fuzz-calendarspec shared: fix integer overflow in calendarspec 2020-05-15 16:07:29 +02:00
fuzz-catalog catalog: reject entries where the language is too short early 2018-11-29 13:41:40 +09:00
fuzz-dhcp6-client dhcp6: use unaligned_read_be32() 2019-09-20 08:04:15 +00:00
fuzz-dhcp-server fuzz: rename "fuzz-corpus" directory to just "fuzz" 2018-10-02 09:41:25 +02:00
fuzz-dns-packet travis: turn on nonnull-attribute on Fuzzit 2019-06-15 23:12:24 +02:00
fuzz-env-file fuzz: add env-file fuzzer 2019-03-11 14:11:28 +01:00
fuzz-fido-id-desc udev: Add id program and rule for FIDO security tokens 2019-09-07 02:23:58 +09:00
fuzz-journal-remote basic/utf8: do not read past end of string when looking for a multi-byte character 2019-02-26 12:37:40 +01:00
fuzz-journald-audit journald: check whether sscanf has changed the value corresponding to %n 2018-11-17 11:25:19 +01:00
fuzz-journald-kmsg tests: add a reproducer for a heap-buffer-overflow fixed in 937b117137 2018-11-16 08:45:16 +01:00
fuzz-journald-native-fd tests: add a fuzzer for server_process_native_file 2018-11-23 17:29:59 +01:00
fuzz-journald-stream tests: add a fuzzer for journald streams 2018-11-20 03:03:32 +01:00
fuzz-journald-syslog fuzz: unify the "fuzz-regressions" directory with the main corpus 2018-10-02 09:41:25 +02:00
fuzz-json fuzz: add testcase of already fixed issue 10908 2018-11-12 01:17:45 +09:00
fuzz-link-parser link: Allow configuring RX mini and jumbo ring sizes, too 2020-04-29 18:57:13 +02:00
fuzz-lldp tests: add an lldp fuzzer 2018-10-29 15:24:16 +00:00
fuzz-ndisc-rs fuzz: add testcase of oss-fuzz#10734 2018-11-12 02:04:35 +09:00
fuzz-netdev-parser network: allow setting VLAN protocol on bridges 2020-05-14 17:59:57 +02:00
fuzz-network-parser network: Add support to group links. 2020-05-15 15:27:07 +02:00
fuzz-nspawn-oci nspawn-oci: fix double free 2019-03-22 17:39:12 +01:00
fuzz-nspawn-settings fuzz: add testcase for oss-fuzz#13691 2019-03-15 23:54:30 +09:00
fuzz-udev-database fuzz: add a sample for fuzz-udev-database 2019-02-26 13:28:30 +09:00
fuzz-udev-rules test: add testcase for oss-fuzz#12980 2019-02-13 04:16:30 +09:00
fuzz-unit-file manager: add CoredumpFilter= setting 2020-04-09 14:08:48 +02:00
fuzz-varlink shared/varlink: add missing setting of output_buffer_allocated 2019-05-17 15:09:32 +02:00
.gitattributes fuzz: rename "fuzz-corpus" directory to just "fuzz" 2018-10-02 09:41:25 +02:00
meson.build meson: scope more git invocations with current_source_dir() 2019-03-12 15:01:47 +01:00